78% wp-smart-preloader

Code Review | WP Smart Preloader

WordPress plugin WP Smart Preloader scored78%from 54 tests.

About plugin

  • Plugin page: wp-smart-preloader
  • Plugin version: 1.15.1
  • PHP version: 7.4.16
  • WordPress compatibility: 2.8-6.0
  • WordPress version: 6.3.1
  • First release: Dec 18, 2015
  • Latest release: Jan 18, 2023
  • Number of updates: 44
  • Update frequency: every 58.8 days
  • Top authors: ashokmhrj (68.18%)catchsquare (34.09%)

Code review

54 tests

User reviews

23 reviews

Install metrics

8,000+ active /153,074 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 gracefully, with no errors

Server metrics [RAM: ▼0.10MB] [CPU: ▼3.94ms] Passed 4 tests

Analyzing server-side resources used by WP Smart Preloader
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.89 ▼0.5722.45 ▼18.80
Dashboard /wp-admin3.36 ▲0.0549.48 ▼1.44
Posts /wp-admin/edit.php3.41 ▲0.0551.33 ▲4.93
Add New Post /wp-admin/post-new.php5.94 ▲0.0587.89 ▲0.26
Media Library /wp-admin/upload.php3.28 ▲0.0535.82 ▲4.22
WP Smart Preloader /wp-admin/options-general.php?page=wsp-loader3.2532.58

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for WP Smart Preloader
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,956 ▲22113.64 ▼0.948.02 ▲6.1542.51 ▲1.08
Dashboard /wp-admin2,217 ▲264.88 ▼1.00106.58 ▼1.3041.37 ▼4.32
Posts /wp-admin/edit.php2,097 ▲81.99 ▼0.0334.19 ▼1.5235.57 ▼0.86
Add New Post /wp-admin/post-new.php1,522 ▼1123.08 ▲0.06638.55 ▼13.5654.04 ▲1.57
Media Library /wp-admin/upload.php1,399 ▲84.22 ▲0.0196.16 ▼3.5340.69 ▼2.89
WP Smart Preloader /wp-admin/options-general.php?page=wsp-loader1,0163.5472.1159.53

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

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

Smoke tests 50% 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)
Everything seems fine, however this is by no means an exhaustive test

SRP 0% 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
Almost there! Just fix the following items
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/wp-smart-preloader/wp-preloader.php
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_uninstall_hook() in wp-content/plugins/wp-smart-preloader/inc/wsp_uninstall.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-smart-preloader/inc/wsp-option_page.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 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
8 plugin tags: preload, posts, plugin, preloader, wp smart preloader...

wp-smart-preloader/wp-preloader.php 92% from 13 tests

The main file in "WP Smart Preloader" v. 1.15.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please make the necessary changes and fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("wp-smart-preloader.php" instead of "wp-preloader.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected803 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
CSS36740484
PHP35676196
JavaScript3311123

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity19.00
▷ Minimum class complexity19.00
▷ Maximum class complexity19.00
Average method complexity2.06
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods17
▷ Static methods00.00%
▷ Public methods17100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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
There were not PNG files found in your plugin