84% mpress-image-refresh

Code Review | Image Refresh

WordPress plugin Image Refresh scored84%from 54 tests.

About plugin

  • Plugin page: mpress-image-refresh
  • Plugin version: 2.2.1
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-6.0
  • WordPress version: 6.3.1
  • First release: Nov 11, 2012
  • Latest release: Jul 31, 2022
  • Number of updates: 16
  • Update frequency: every 221.9 days
  • Top authors: woodent (62.5%)wpscholar (43.75%)

Code review

54 tests

User reviews

16 reviews

Install metrics

1,000+ active /16,916 total downloads

Benchmarks

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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼2.84ms] Passed 4 tests

A check of server-side resources used by Image Refresh
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0338.50 ▼6.00
Dashboard /wp-admin3.34 ▲0.0444.42 ▼3.95
Posts /wp-admin/edit.php3.39 ▲0.0348.80 ▼0.26
Add New Post /wp-admin/post-new.php5.92 ▲0.0386.12 ▼1.16
Media Library /wp-admin/upload.php3.27 ▲0.0334.00 ▲0.19

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Image Refresh
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲7913.32 ▼1.041.89 ▼0.0941.46 ▲4.25
Dashboard /wp-admin2,206 ▲185.85 ▲0.97100.44 ▼4.6340.52 ▼4.11
Posts /wp-admin/edit.php2,089 ▼02.02 ▲0.0440.25 ▼1.6235.37 ▼4.37
Add New Post /wp-admin/post-new.php1,520 ▼2223.32 ▲5.02591.19 ▼62.6558.88 ▲8.02
Media Library /wp-admin/upload.php1,382 ▼34.19 ▼0.0296.77 ▲1.1440.96 ▼1.67

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
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Good news, no errors were detected

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
The following issues need your attention
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function load_plugin_textdomain() in wp-content/plugins/mpress-image-refresh/mpress-image-refresh.php:50

User-side errors Passed 1 test

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

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
7 plugin tags: image refresh, different image, random image, image rotation, image with caption...

mpress-image-refresh/mpress-image-refresh.php Passed 13 tests

This is the main PHP file of "Image Refresh" version 2.2.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
38 characters long description:
Show a fresh image on every page load.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin196 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP158126186
CSS11010

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity23.00
▷ Minimum class complexity23.00
▷ Maximum class complexity23.00
Average method complexity3.75
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods8
▷ Static methods8100.00%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ 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

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG files were detected