84% image-override

Code Review | Image Override

WordPress plugin Image Override scored 84% from 54 tests.

About plugin

  • Plugin page: image-override
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.3
  • WordPress version: 6.3.1
  • First release: Aug 26, 2011
  • Latest release: Aug 19, 2015
  • Number of updates: 19
  • Update frequency: every 76.5 days
  • Top authors: billerickson (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

20+ active / 3,274 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 successfully, without throwing any errors or notices

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

This is a short check of server-side resources used by Image Override
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.62 ▲0.1657.80 ▲14.81
Dashboard /wp-admin3.45 ▲0.1457.44 ▲4.75
Posts /wp-admin/edit.php3.57 ▲0.2153.14 ▲4.34
Add New Post /wp-admin/post-new.php6.06 ▲0.1695.66 ▼5.04
Media Library /wp-admin/upload.php3.38 ▲0.1439.82 ▼0.73

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Image Override
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲3613.18 ▼1.236.34 ▲4.5146.87 ▼0.12
Dashboard /wp-admin2,206 ▼04.84 ▼0.00105.44 ▼2.1843.61 ▲3.09
Posts /wp-admin/edit.php2,089 ▼32.04 ▲0.0539.69 ▼0.8635.81 ▲0.27
Add New Post /wp-admin/post-new.php6,566 ▲5,03720.13 ▼2.911,147.48 ▲497.9158.33 ▼9.05
Media Library /wp-admin/upload.php1,391 ▲34.30 ▲0.1795.75 ▼24.5440.18 ▼8.90

Uninstaller [IO: ✅] [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
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

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
Please fix the following items
  • 3× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/image-override/lib/metabox/init.php:37
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/image-override/image-override.php:19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/image-override/lib/metabox/example-functions.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
3 plugin tags: featured, thumbnail, image

image-override/image-override.php Passed 13 tests

"Image Override" version 1.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
60 characters long description:
Allows you to override WordPress' auto generated thumbnails.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Good job! No executable or dangerous file extensions detected1,354 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP3113139775
CSS1219315
JavaScript22467131
Markdown1250107
PO File14626

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.62
Average class complexity56.00
▷ Minimum class complexity2.00
▷ Maximum class complexity154.00
Average method complexity12.79
▷ Minimum method complexity1.00
▷ Maximum method complexity93.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods14
▷ Static methods00.00%
▷ Public methods14100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
14 compressed PNG files occupy 0.02MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
lib/metabox/images/ui-bg_glass_55_fbf9ee_1x400.png0.12KB0.14KB0.00%
lib/metabox/images/ui-bg_glass_75_dadada_1x400.png0.11KB0.16KB0.00%
lib/metabox/images/ui-bg_highlight-soft_75_cccccc_1x100.png0.10KB0.17KB0.00%
lib/metabox/images/ui-icons_888888_256x240.png5.23KB4.11KB▼ 21.49%
lib/metabox/images/ui-icons_2e83ff_256x240.png4.27KB4.11KB▼ 3.78%