72% wp-preloader

Code Review | WP Preloader

WordPress plugin WP Preloader scored72%from 54 tests.

About plugin

  • Plugin page: wp-preloader
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.7.2
  • WordPress version: 6.3.1
  • First release: Apr 15, 2016
  • Latest release: Sep 12, 2016
  • Number of updates: 16
  • Update frequency: every 28.1 days
  • Top authors: mamunitiw (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

30+ active /4,085 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.02MB] [CPU: ▼2.37ms] Passed 4 tests

This is a short check of server-side resources used by WP Preloader
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0137.24 ▼4.03
Dashboard /wp-admin3.33 ▲0.0345.84 ▼4.40
Posts /wp-admin/edit.php3.38 ▲0.0348.51 ▼0.32
Add New Post /wp-admin/post-new.php5.93 ▲0.0599.00 ▲11.07
Media Library /wp-admin/upload.php3.25 ▲0.0332.85 ▼0.73
WP Preloader /wp-admin/options-general.php?page=wppreloader_options3.2231.17

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 22 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
db_upgraded
can_compress_scripts
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

WP Preloader: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,906 ▲14913.88 ▼0.775.44 ▲3.7139.23 ▼2.39
Dashboard /wp-admin2,229 ▲385.05 ▼0.85110.63 ▲1.1244.58 ▼2.56
Posts /wp-admin/edit.php2,117 ▲282.28 ▲0.3141.52 ▲1.2534.47 ▼1.40
Add New Post /wp-admin/post-new.php1,540 ▲718.22 ▼4.96591.04 ▼80.7234.35 ▼15.95
Media Library /wp-admin/upload.php1,414 ▲264.38 ▲0.1498.78 ▼0.8141.12 ▼3.00
WP Preloader /wp-admin/options-general.php?page=wppreloader_options9672.3638.1027.52

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These server-side errors were triggered
    • > GET request to /wp-admin/options-general.php?page=wppreloader_options
    • > Notice in wp-content/plugins/wp-preloader/includes/settings.php+27
    Trying to access array offset on value of type bool

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 output text when accessed directly:
    • > /wp-content/plugins/wp-preloader/wp-preloader.php
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/wp-preloader/includes/settings.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/wp-preloader/includes/content.php:3

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need to be fixed:
  • Tags: You are using too many tags: 19 tag instead of maximum 10
  • Donate link: Invalid URI found ("")
You can take inspiration from this readme.txt

wp-preloader/wp-preloader.php Passed 13 tests

The main PHP script in "WP Preloader" version 1.0 is automatically included on every request by WordPress
86 characters long description:
WP Preloader is a simple and customizable wordpress preloader plugin.Very easy to use.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin170 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP64355140
CSS13821
JavaScript2549

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity3.50
▷ Minimum class complexity2.00
▷ Maximum class complexity5.00
Average method complexity1.50
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods10
▷ Static methods00.00%
▷ Public methods10100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
3 PNG files occupy 0.12MB with 0.12MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
(invalid) screenshot-1.png29.56KB0.00KB▼ 100.00%
(invalid) screenshot-3.png12.08KB0.00KB▼ 100.00%
(invalid) screenshot-2.png76.22KB0.00KB▼ 100.00%