84% preload-current-images

Code Review | Preload Current Images

WordPress plugin Preload Current Images scored84%from 54 tests.

About plugin

  • Plugin page: preload-current-i...
  • Plugin version: 1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.5.1
  • WordPress version: 6.3.1
  • First release: Mar 11, 2013
  • Latest release: Oct 29, 2013
  • Number of updates: 7
  • Update frequency: every 33.1 days
  • Top authors: MMDeveloper (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /2,826 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.01MB] [CPU: ▼8.17ms] Passed 4 tests

An overview of server-side resources used by Preload Current Images
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0142.63 ▼0.38
Dashboard /wp-admin3.32 ▲0.0149.64 ▼10.73
Posts /wp-admin/edit.php3.37 ▲0.0151.12 ▼0.25
Add New Post /wp-admin/post-new.php5.90 ▲0.0193.60 ▼21.32
Media Library /wp-admin/upload.php3.24 ▲0.0139.25 ▲2.93

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
can_compress_scripts
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Preload Current Images
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,922 ▲16113.90 ▼0.4610.64 ▲8.9440.89 ▲0.42
Dashboard /wp-admin2,195 ▲155.62 ▼0.0596.28 ▲8.4941.84 ▼3.02
Posts /wp-admin/edit.php2,100 ▼01.96 ▼0.0840.68 ▼0.7736.17 ▲0.86
Add New Post /wp-admin/post-new.php1,535 ▲918.38 ▼4.71656.11 ▲8.7586.00 ▲30.01
Media Library /wp-admin/upload.php1,403 ▲34.20 ▼0.0499.04 ▼6.3343.14 ▼5.03

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments

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 everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/preload-current-images/preload-current-images.php:24

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
7 plugin tags: slides, images, slide, current, jquery...

preload-current-images/preload-current-images.php Passed 13 tests

"Preload Current Images" version 1.3's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
107 characters long description:
Preloads all images on the current page, making the images render faster. Works especially well for slides.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Success! There were no dangerous files found in this plugin104 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript19249
PHP1171548
CSS1007

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.00
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%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG images were found in this plugin