79% resizefly

Code Review | ResizeFly

WordPress plugin ResizeFly scored79%from 54 tests.

About plugin

  • Plugin page: resizefly
  • Plugin version: 3.2.6
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7.0-5.6
  • WordPress version: 6.3.1
  • First release: May 25, 2016
  • Latest release: Dec 17, 2020
  • Number of updates: 84
  • Update frequency: every 28.3 days
  • Top authors: alpipego (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

20+ active /6,446 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.68MB] [CPU: ▲2.55ms] Passed 4 tests

Server-side resources used by ResizeFly
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.89 ▲0.4347.01 ▲8.54
Dashboard /wp-admin4.12 ▲0.8152.20 ▲4.94
Posts /wp-admin/edit.php4.17 ▲0.8153.66 ▲4.93
Add New Post /wp-admin/post-new.php6.64 ▲0.7586.43 ▼8.21
Media Library /wp-admin/upload.php3.99 ▲0.7545.94 ▲12.07
Resizefly /wp-admin/upload.php?page=resizefly4.0038.55

Server storage [IO: ▲0.22MB] [DB: ▲0.00MB] Passed 3 tests

Filesystem and database footprint
The plugin installed successfully
Filesystem: 95 new files
Database: no new tables, 11 new options
New WordPress options
resizefly_sizes
widget_recent-posts
widget_recent-comments
resizefly_user_sizes
resizefly_restrict_sizes
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
resizefly_resized_path
db_upgraded
...

Browser metrics Passed 4 tests

This is an overview of browser requirements for ResizeFly
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲714.35 ▲0.081.71 ▼0.1545.01 ▼2.35
Dashboard /wp-admin2,202 ▲225.67 ▲0.0190.39 ▲1.1039.62 ▼1.28
Posts /wp-admin/edit.php2,104 ▲42.09 ▲0.0735.21 ▼0.9032.06 ▼8.45
Add New Post /wp-admin/post-new.php1,529 ▲123.66 ▲0.40689.36 ▲32.4650.05 ▲1.02
Media Library /wp-admin/upload.php1,406 ▲64.18 ▼0.00100.79 ▼7.9547.07 ▲2.40
Resizefly /wp-admin/upload.php?page=resizefly1,3711.7826.1037.21

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 2× PHP files output text when accessed directly:
    • > /wp-content/plugins/resizefly/views/field/partials/sizes/row-template.php
    • > /wp-content/plugins/resizefly/views/field/partials/sizes/legend.php
  • 73× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Alpipego\\Resizefly\\object() in wp-content/plugins/resizefly/app/config/compatibles-admin.php:10
    • > PHP Notice
      Undefined variable: args in wp-content/plugins/resizefly/views/field/resizefly-addon-license.php on line 13
    • > PHP Fatal error
      Uncaught Error: Interface 'Alpipego\\Resizefly\\Image\\EditorWrapperInterface' not found in wp-content/plugins/resizefly/src/Image/EditorWrapper.php:16
    • > PHP Notice
      Undefined variable: args in wp-content/plugins/resizefly/views/field/partials/sizes/legend.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/resizefly/app/actions/wp-get-attachment-src.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/resizefly/app/actions/template-redirect.php:18
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/resizefly/views/page/resizefly.php on line 8
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/resizefly/views/field/resizefly-restrict-sizes.php on line 12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/resizefly/app/actions/after-setup-theme.php:11
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/resizefly/views/field/resizefly-purge-cache.php on line 11

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
10 plugin tags: gif, dynamic images, on-the-fly, dynamic, jpg...

resizefly/resizefly.php Passed 13 tests

The main PHP script in "ResizeFly" version 3.2.6 is automatically included on every request by WordPress
41 characters long description:
Dynamically resize your images on the fly

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin4,132 lines of code in 91 files:
LanguageFilesBlank linesComment linesLines of code
PHP868832,1403,932
JavaScript4180199
CSS1001

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity7.88
▷ Minimum class complexity1.00
▷ Maximum class complexity73.00
Average method complexity2.44
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces15
Interfaces13
Traits0
Classes45
▷ Abstract classes36.67%
▷ Concrete classes4293.33%
▷ Final classes1126.19%
Methods311
▷ Static methods00.00%
▷ Public methods25983.28%
▷ Protected methods61.93%
▷ Private methods4614.79%
Functions42
▷ Named functions37.14%
▷ Anonymous functions3992.86%
Constants10
▷ Global constants00.00%
▷ Class constants10100.00%
▷ Public constants10100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
There were not PNG files found in your plugin