84% lh-cache-remote-images

Code Review | LH Cache Remote Images

WordPress plugin LH Cache Remote Images scored84%from 54 tests.

About plugin

  • Plugin page: lh-cache-remote-i...
  • Plugin version: 1.04
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.8.1
  • WordPress version: 6.3.1
  • First release: Feb 27, 2017
  • Latest release: Oct 8, 2017
  • Number of updates: 7
  • Update frequency: every 283.9 days
  • Top authors: shawfactor (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,450 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
The plugin installed successfully, without throwing any errors or notices

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

This is a short check of server-side resources used by LH Cache Remote Images
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0444.20 ▲0.56
Dashboard /wp-admin3.34 ▼0.0049.00 ▼19.73
Posts /wp-admin/edit.php3.39 ▲0.0450.84 ▼2.95
Add New Post /wp-admin/post-new.php5.92 ▲0.0490.12 ▼8.66
Media Library /wp-admin/upload.php3.26 ▲0.0337.31 ▲3.21

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
db_upgraded
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for LH Cache Remote Images
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲314.68 ▲0.331.71 ▼0.2646.68 ▲2.48
Dashboard /wp-admin2,195 ▲185.57 ▼0.0491.80 ▲1.3135.51 ▼5.84
Posts /wp-admin/edit.php2,103 ▼02.02 ▲0.0242.31 ▲1.6135.72 ▼4.13
Add New Post /wp-admin/post-new.php1,531 ▲323.12 ▲0.11694.82 ▲34.1866.09 ▲10.00
Media Library /wp-admin/upload.php1,403 ▼04.13 ▼0.05117.12 ▲13.3645.29 ▲2.26

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
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means 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
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 add_action() in wp-content/plugins/lh-cache-remote-images/lh-cache-remote-images.php:380

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

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
6 plugin tags: cache images, grab images, archive remote images, media, auto-save images...

lh-cache-remote-images/lh-cache-remote-images.php Passed 13 tests

The main file in "LH Cache Remote Images" v. 1.04 serves as a complement to information provided in readme.txt and as the entry point to the plugin
67 characters long description:
This plugin caches all remote images in post_content asynchronously

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 detected270 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP235668270

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity25.50
▷ Minimum class complexity22.00
▷ Maximum class complexity29.00
Average method complexity3.88
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods17
▷ Static methods635.29%
▷ Public methods847.06%
▷ Protected methods00.00%
▷ Private methods952.94%
Functions0
▷ Named functions00.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
No PNG files were detected