10% image-effects-generator

Code Review | Image Effects Generator

WordPress plugin Image Effects Generator scored10%from 54 tests.

About plugin

  • Plugin page: image-effects-gen...
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.4
  • WordPress version: 6.3.1
  • First release: Feb 26, 2014
  • Latest release: Feb 28, 2014
  • Number of updates: 9
  • Update frequency: every 0.2 days
  • Top authors: tomsansome (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /4,116 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
These installer errors require your attention
  • Install procedure had errors
    • > Warning in wp-content/plugins/image-effects-generator/app/filters/black_and_white.php+4
    Use of undefined constant yes_please - assumed 'yes_please' (this will throw an Error in a future version of PHP)

Server metrics [RAM: ▼1.93MB] [CPU: ▼55.79ms] Passed 4 tests

Analyzing server-side resources used by Image Effects Generator
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.07 ▼1.404.52 ▼37.13
Dashboard /wp-admin2.09 ▼1.267.01 ▼49.66
Posts /wp-admin/edit.php2.09 ▼1.276.27 ▼39.72
Add New Post /wp-admin/post-new.php2.09 ▼3.806.31 ▼96.63
Media Library /wp-admin/upload.php2.09 ▼1.147.01 ▼27.40
Image Effects Settings /wp-admin/options-general.php?page=image-effects-generator/settings/settings_page.php2.096.57

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 12 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Image Effects Generator
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲3313.29 ▼1.084.16 ▲2.2545.00 ▲5.61
Dashboard /wp-admin2,210 ▲195.83 ▼0.0797.85 ▼5.8240.42 ▼6.75
Posts /wp-admin/edit.php2,093 ▲42.05 ▲0.0634.18 ▼6.2933.93 ▼2.01
Add New Post /wp-admin/post-new.php1,545 ▲1718.26 ▼0.02593.64 ▼63.5850.95 ▼3.84
Media Library /wp-admin/upload.php1,392 ▲14.20 ▼0.0297.76 ▼5.9642.32 ▼2.78
Image Effects Settings /wp-admin/options-general.php?page=image-effects-generator/settings/settings_page.php8302.0722.2824.34

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • The plugin did not uninstall gracefully
    • > Warning in wp-content/plugins/image-effects-generator/app/filters/black_and_white.php+4
    Use of undefined constant yes_please - assumed 'yes_please' (this will throw an Error in a future version of PHP)
  • The uninstall procedure has failed, leaving 6 options in the database
    • 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 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Smoke test failed, please fix the following
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=image-effects-generator/settings/settings_page.php
    • > Warning in wp-content/plugins/image-effects-generator/app/filters/pixelate.php+4
    Use of undefined constant yes_please - assumed 'yes_please' (this will throw an Error in a future version of PHP)
    • > GET request to /wp-admin/options-general.php?page=image-effects-generator/settings/settings_page.php
    • > User notice in wp-includes/functions.php+5905
    Function add_submenu_page was called incorrectly. The seventh parameter passed to add_submenu_page() should be numeric representing menu position. Please see Debugging in WordPress for more information. (This message was added in version 5.3.0.)

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 11× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/image-effects-generator/app/filters/black_and_white.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/image-effects-generator/app/filters/sepia.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/image-effects-generator/app/filters/pixelate.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/image-effects-generator/app/filters/sharpen.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/image-effects-generator/settings/settings_page.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/image-effects-generator/app/show_sizes.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/image-effects-generator/app/filters/blurred.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_fields() in wp-content/plugins/image-effects-generator/settings/settings_page_content.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/image-effects-generator/app/filters/black_and_white.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/image-effects-generator/app/filters/negative.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that require attention:
  • Plugin Name: Please specify the plugin name on the first line ( === image-effects-generator === )
  • Screenshots: Screenshot #1 (Displayed on front end) image missing
The official readme.txt is a good inspiration

image-effects-generator/image-effect-generator.php 92% from 13 tests

The main PHP file in "Image Effects Generator" ver. 1.0.1 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("image-effects-generator.php" instead of "image-effect-generator.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin352 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP119210352

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.15
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions22
▷ Named functions22100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
PNG images were not found in this plugin