83% all-image-list

Code Review | WP All Image Sizes

WordPress plugin WP All Image Sizes scored83%from 54 tests.

About plugin

  • Plugin page: all-image-list
  • Plugin version: 0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-3.7
  • WordPress version: 6.3.1
  • First release: Dec 6, 2013
  • Latest release: Dec 7, 2013
  • Number of updates: 10
  • Update frequency: every 0.1 days
  • Top authors: drosophila (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

100+ active /2,682 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

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

Analyzing server-side resources used by WP All Image Sizes
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0240.46 ▼0.16
Dashboard /wp-admin3.32 ▲0.0251.29 ▲0.44
Posts /wp-admin/edit.php3.37 ▲0.0248.55 ▼8.64
Add New Post /wp-admin/post-new.php5.91 ▲0.0289.91 ▼17.25
Media Library /wp-admin/upload.php3.25 ▲0.0238.12 ▲1.77

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

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

Browser metrics Passed 4 tests

A check of browser resources used by WP All Image Sizes
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.35 ▲0.121.83 ▲0.2343.08 ▼3.94
Dashboard /wp-admin2,195 ▲155.59 ▼0.0490.83 ▲0.5938.14 ▼2.20
Posts /wp-admin/edit.php2,100 ▼02.12 ▲0.0935.54 ▼4.3230.99 ▼6.36
Add New Post /wp-admin/post-new.php1,526 ▼023.21 ▲0.03642.39 ▼21.4357.42 ▲2.04
Media Library /wp-admin/upload.php1,397 ▼34.21 ▼0.0098.48 ▼4.6644.23 ▼1.73

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

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
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/all-image-list/wp-all-image-sizes.php:21

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need your attention:
  • Contributors: Plugin contributors not specified
  • Screenshots: Add images for these screenshots: #1 (Screenshot of the meta box in the attachment page), #2 (Screenshot of the Media Uploader in Wordpress 3.7)
Please take inspiration from this readme.txt

all-image-list/wp-all-image-sizes.php 92% from 13 tests

The entry point to "WP All Image Sizes" version 0.2 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("all-image-list.php" instead of "wp-all-image-sizes.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
No dangerous file extensions were detected71 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1542271

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.21
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

All PNG images should be compressed to minimize bandwidth usage for end users
2 PNG files occupy 0.04MB with 0.02MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png19.69KB8.29KB▼ 57.91%
screenshot-1.png19.21KB7.71KB▼ 59.85%