88% preloader-plus

Code Review | Preloader Plus - Wordpress Loading Screen Plugin

WordPress plugin Preloader Plus - Wordpress Loading Screen Plugin scored 88% from 54 tests.

About plugin

  • Plugin page: preloader-plus
  • Plugin version: 2.2.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.5
  • WordPress version: 5.8.1
  • First release: Mar 6, 2018
  • Latest release: Sep 15, 2020
  • Number of updates: 20
  • Update frequency: every 46.2 days
  • Top authors: maxsdesign (100%)

Code review

54 tests

User reviews

457 reviews

Install metrics

40,000+ active / 140,888 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

Server metrics [RAM: ▲0.29MB] [CPU: ▼171.06ms] Passed 4 tests

Server-side resources used by Preloader Plus - Wordpress Loading Screen Plugin
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.13 ▲0.4136.46 ▲18.09
Dashboard /wp-admin3.34 ▲0.2842.82 ▲4.15
Posts /wp-admin/edit.php3.45 ▲0.3438.26 ▼6.32
Add New Post /wp-admin/post-new.php5.70 ▲0.2693.36 ▼682.77
Media Library /wp-admin/upload.php3.29 ▲0.2835.08 ▲0.70

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 36 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Preloader Plus - Wordpress Loading Screen Plugin
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,880 ▲28416.25 ▲0.6513.25 ▲4.2045.84 ▼2.39
Dashboard /wp-admin2,988 ▲516.04 ▲0.05136.27 ▼9.28125.27 ▲13.13
Posts /wp-admin/edit.php2,751 ▲342.60 ▼0.1066.24 ▼24.8587.87 ▼16.14
Add New Post /wp-admin/post-new.php1,699 ▲11817.64 ▼0.03382.46 ▼64.71109.80 ▼9.38
Media Library /wp-admin/upload.php1,774 ▼335.01 ▲0.01133.05 ▼41.47140.43 ▼2.55

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Uninstall script ran successfully

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/preloader-plus/preloader-plus.php
  • 11× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Warning
      Use of undefined constant PRELOADER_PLUS_VERSION - assumed 'PRELOADER_PLUS_VERSION' (this will throw an Error in a future version of PHP) in wp-content/plugins/preloader-plus/views/plugin-page.php on line 11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/preloader-plus/preloader-plus-pro/inc/customizer.php:353
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/preloader-plus/views/Ripple.php:50
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/preloader-plus/views/Bars.php:45
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/preloader-plus/views/DualRing.php:38
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/preloader-plus/views/Dots.php:50
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/preloader-plus/views/plugin-page.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/preloader-plus/views/Eclipse.php:47
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/preloader-plus/views/Rolling.php:37
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/preloader-plus/inc/customizer.php:817

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)
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
7 plugin tags: page loading, page loading screen, loading screen, page loader, loading page...

preloader-plus/preloader-plus.php 92% from 13 tests

"Preloader Plus - Wordpress Loading Screen Plugin" version 2.2.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 147 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin2,601 lines of code in 26 files:
LanguageFilesBlank linesComment linesLines of code
PHP153113172,117
CSS6598314
JavaScript5359170

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity11.83
▷ Minimum class complexity2.00
▷ Maximum class complexity47.00
Average method complexity2.76
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods37
▷ Static methods25.41%
▷ Public methods2875.68%
▷ Protected methods410.81%
▷ Private methods513.51%
Functions21
▷ Named functions21100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
2 PNG files occupy 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/Dots.png2.53KB1.67KB▼ 33.87%
assets/img/preloader-plus-logo.png10.14KB4.43KB▼ 56.32%