89% wp-smartcrop

Code Review | WP SmartCrop

WordPress plugin WP SmartCrop scored89%from 54 tests.

About plugin

  • Plugin page: wp-smartcrop
  • Plugin version: 2.0.8
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.0-6.3.2
  • WordPress version: 6.3.1
  • First release: Mar 15, 2016
  • Latest release: Oct 20, 2023
  • Number of updates: 42
  • Update frequency: every 66.1 days
  • Top authors: wpsmartcrop (61.9%)burlingtonbytes (40.48%)

Code review

54 tests

User reviews

9 reviews

Install metrics

4,000+ active /69,990 total downloads


Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.14MB] [CPU: ▼7.73ms] Passed 4 tests

Server-side resources used by WP SmartCrop
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.61 ▲0.1439.88 ▼4.96
Dashboard /wp-admin3.45 ▲0.1446.24 ▼3.42
Posts /wp-admin/edit.php3.56 ▲0.2048.72 ▲2.76
Add New Post /wp-admin/post-new.php6.03 ▲0.1482.30 ▼25.28
Media Library /wp-admin/upload.php3.38 ▲0.1436.76 ▲4.66
WP SmartCrop /wp-admin/options-general.php?page=wp-smartcrop3.3433.62

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 14 new files
Database: no new tables, 6 new options
New WordPress options

Browser metrics Passed 4 tests

This is an overview of browser requirements for WP SmartCrop
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,880 ▲11913.52 ▼0.887.86 ▲6.1439.48 ▼7.38
Dashboard /wp-admin2,199 ▲225.61 ▼0.0584.22 ▼16.4337.67 ▼8.82
Posts /wp-admin/edit.php2,104 ▲11.99 ▼0.0239.78 ▼1.6637.26 ▲4.61
Add New Post /wp-admin/post-new.php1,533 ▲723.49 ▲0.46671.17 ▲57.0960.65 ▲10.99
Media Library /wp-admin/upload.php1,408 ▲114.30 ▲0.1396.28 ▼5.3943.77 ▼0.12
WP SmartCrop /wp-admin/options-general.php?page=wp-smartcrop8571.9921.4230.00

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 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
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test


Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
  • Tags: Please delete some tags, you are using 19 tag instead of maximum 10
The official readme.txt might help

wp-smartcrop/wp-smartcrop.php 92% from 13 tests

This is the main PHP file of "WP SmartCrop" version 2.0.8, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Success! There were no dangerous files found in this plugin1,222 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.48
Average class complexity143.00
▷ Minimum class complexity143.00
▷ Maximum class complexity143.00
Average method complexity5.06
▷ Minimum method complexity1.00
▷ Maximum method complexity30.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
▷ Static methods12.86%
▷ Public methods2057.14%
▷ Protected methods00.00%
▷ Private methods1542.86%
▷ Named functions00.00%
▷ Anonymous functions00.00%
▷ 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
2 compressed PNG files occupy 0.01MB
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings