83% shopp-image-tools

Code Review | Shopp Image Tools

WordPress plugin Shopp Image Tools scored83%from 54 tests.

About plugin

  • Plugin page: shopp-image-tools
  • Plugin version: 1.3.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4.2+
  • WordPress version: 6.3.1
  • First release: Sep 27, 2012
  • Latest release: May 14, 2014
  • Number of updates: 15
  • Update frequency: every 42.1 days
  • Top authors: WebsiteBakery (93.33%)crunnells (13.33%)

Code review

54 tests

User reviews

2 reviews

Install metrics

30+ active /2,963 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.02MB] [CPU: ▼5.67ms] Passed 4 tests

A check of server-side resources used by Shopp Image Tools
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0237.72 ▼6.16
Dashboard /wp-admin3.33 ▲0.0247.03 ▲1.36
Posts /wp-admin/edit.php3.38 ▲0.0245.90 ▼1.64
Add New Post /wp-admin/post-new.php5.91 ▲0.0288.19 ▼14.89
Media Library /wp-admin/upload.php3.25 ▲0.0238.18 ▲0.01

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 12 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Shopp Image Tools
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.17 ▼1.431.69 ▼0.0741.38 ▼0.45
Dashboard /wp-admin2,209 ▲215.91 ▲0.9799.37 ▼5.7842.50 ▲0.87
Posts /wp-admin/edit.php2,089 ▼32.04 ▼0.0139.03 ▼2.7734.33 ▼3.33
Add New Post /wp-admin/post-new.php1,528 ▼1723.46 ▲5.19677.99 ▲66.9954.49 ▲5.09
Media Library /wp-admin/upload.php1,391 ▲34.19 ▲0.0294.90 ▼2.9742.99 ▲0.13

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Almost there! Just fix the following items
  • 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/shopp-image-tools/inc/adminui.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'AdminController' not found in wp-content/plugins/shopp-image-tools/inc/admin.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/shopp-image-tools/shoppimagetools.php:35

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 90% 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
Please fix the following attributes:
  • Tested up to: Version format is invalid
You can take inspiration from this readme.txt

shopp-image-tools/shoppimagetools.php 85% from 13 tests

Analyzing the main PHP file in "Shopp Image Tools" version 1.3.0
Please take the time to fix the following:
  • Description: The description should be shorter than 140 characters (currently 308 characters long)
  • Main file name: The principal plugin file should be the same as the plugin slug ("shopp-image-tools.php" instead of "shoppimagetools.php")

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 plugin647 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP515866485
JavaScript12620102
CSS111060

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity21.75
▷ Minimum class complexity5.00
▷ Maximum class complexity43.00
Average method complexity3.59
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods32
▷ Static methods412.50%
▷ Public methods1340.62%
▷ Protected methods1959.38%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants00.00%
▷ Class constants2100.00%
▷ Public constants2100.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
3 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
resources/transparent-pixel.png0.17KB0.12KB▼ 30.34%
resources/nuvola-tick-16px.png0.86KB0.62KB▼ 28.65%
resources/nuvola-cross-16px.png0.98KB0.88KB▼ 10.39%