84% zoom-img

Code Review | Zoom img

WordPress plugin Zoom img scored84%from 54 tests.

About plugin

  • Plugin page: zoom-img
  • Plugin version: 1.0
  • PHP compatiblity: 5.6.3+
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Dec 15, 2020
  • Latest release: Dec 20, 2020
  • Number of updates: 3
  • Update frequency: every 1.7 days
  • Top authors: nhomcaodem (100%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active /907 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.00MB] [CPU: ▼10.14ms] Passed 4 tests

This is a short check of server-side resources used by Zoom img
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0136.01 ▼2.62
Dashboard /wp-admin3.32 ▼0.0345.86 ▼17.05
Posts /wp-admin/edit.php3.37 ▲0.0150.60 ▼1.79
Add New Post /wp-admin/post-new.php5.90 ▲0.0190.36 ▼19.09
Media Library /wp-admin/upload.php3.24 ▲0.0137.23 ▲0.58

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
db_upgraded
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Zoom img
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,883 ▲13713.89 ▼0.864.80 ▲3.0544.68 ▲3.69
Dashboard /wp-admin2,203 ▲155.83 ▼0.0795.55 ▼4.5740.24 ▼4.14
Posts /wp-admin/edit.php2,092 ▲32.00 ▼0.0539.14 ▼3.7735.80 ▼1.70
Add New Post /wp-admin/post-new.php1,514 ▼2817.38 ▼1.17674.78 ▲62.2052.81 ▼1.04
Media Library /wp-admin/upload.php1,391 ▲34.15 ▼0.00103.46 ▲6.5146.38 ▼0.69

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

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
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/zoom-img/inc/zoomimg-content.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/zoom-img/zoom-img.php:19

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that require attention:
  • Screenshots: Add a description for screenshot #1 in zoom-img/assets to your readme.txt
You can look at the official readme.txt

zoom-img/zoom-img.php Passed 13 tests

The primary PHP file in "Zoom img" version 1.0 is used by WordPress to initiate all plugin functionality
35 characters long description:
Click to enlarge the image to view.

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
Good job! No executable or dangerous file extensions detected512 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript122355325
CSS1263156
PHP221731

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.07
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%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG images were found in this plugin