83% image-effects

Code Review | Image Effects

WordPress plugin Image Effects scored83%from 54 tests.

About plugin

  • Plugin page: image-effects
  • Plugin version: 1.2.0
  • PHP compatiblity: 7.4.9+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.7-6.3.0
  • WordPress version: 6.3.1
  • First release: May 25, 2021
  • Latest release: Aug 11, 2023
  • Number of updates: 15
  • Update frequency: every 53.9 days
  • Top authors: ujw0l (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /815 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

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

Analyzing server-side resources used by Image Effects
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0141.43 ▼0.28
Dashboard /wp-admin3.31 ▲0.0152.19 ▲3.73
Posts /wp-admin/edit.php3.37 ▲0.0152.68 ▲1.67
Add New Post /wp-admin/post-new.php5.90 ▲0.0196.83 ▼0.98
Media Library /wp-admin/upload.php3.24 ▲0.0137.51 ▼0.38

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Image Effects
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,792 ▲3114.70 ▲0.421.75 ▼0.1142.57 ▼3.04
Dashboard /wp-admin2,192 ▲155.49 ▼0.1786.19 ▼1.6538.01 ▼4.75
Posts /wp-admin/edit.php2,097 ▼32.02 ▲0.0435.83 ▼5.8833.18 ▼12.36
Add New Post /wp-admin/post-new.php6,366 ▲4,83527.65 ▲4.63898.24 ▲230.6155.24 ▼4.19
Media Library /wp-admin/upload.php1,400 ▼04.20 ▲0.0196.34 ▼9.2143.68 ▼3.41

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 75% 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)
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/image-effects/image-effects.php:28

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that require attention:
  • Screenshots: These screenshots do not have images: #1 (Gutenberg block), #2 (Block setting), #3 (Post display of image with effects)
The official readme.txt is a good inspiration

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

"Image Effects" version 1.2.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Git Repository: There should be no Git repositories present in your plugin

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Success! There were no dangerous files found in this plugin29,882 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
JSON30029,624
JavaScript43576231
Sass22019
PHP22216
CSS2002

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.00
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%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
3 PNG files occupy 4.92MB with 3.38MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png1,719.09KB529.09KB▼ 69.22%
screenshot-3.png1,491.29KB495.81KB▼ 66.75%
screenshot-2.png1,826.98KB549.89KB▼ 69.90%