Skip to content

Conversation

@stoyan
Copy link
Contributor

@stoyan stoyan commented Oct 10, 2022

Ran a tool called PHPMD to look for unused variables

$ wget -c https://phpmd.org/static/latest/phpmd.phar
$ php phpmd.phar webpagetest/www ansi unusedcode --suffixes php,inc --exclude www/lib/,www/ec2/,www/resources/compiled

Looked around the output and partially applied changes where VSCode's PHP Intelephense seemed to agree with phpmd and changes looked safe, especially careful with the use of globals

Copy link
Contributor

@pmeenan pmeenan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mostly looks good but I think the grayscale logic removal was incorrect and the math issue noted in the comments as well. The video.inc video script logic can probably be removed entirely but that's probably better done as a separate PR.

Make sure to test it out on a dev server, particularly poking around at filmstrips and videos because that looks like where most of the logic was removed.

@stoyan
Copy link
Contributor Author

stoyan commented Oct 11, 2022

Thanks for the thorough review, @pmeenan, this is awesome!

@stoyan stoyan requested a review from pmeenan October 11, 2022 18:29
@pmeenan
Copy link
Contributor

pmeenan commented Oct 11, 2022

LGTM, thanks for the cleanup.

@stoyan stoyan merged commit c73328f into master Oct 12, 2022
@stoyan stoyan deleted the deadlier branch October 12, 2022 17:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants