84% the-preloader

Code Review | Preloader

WordPress plugin Preloader scored84%from 54 tests.

About plugin

  • Plugin page: the-preloader
  • Plugin version: 1.0.9
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4.0-6.2.2
  • WordPress version: 6.3.1
  • First release: Jul 5, 2015
  • Latest release: Jun 20, 2023
  • Number of updates: 68
  • Update frequency: every 42.8 days
  • Top authors: Alobaidi (100%)

Code review

54 tests

User reviews

39 reviews

Install metrics

20,000+ active /213,095 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.00MB] [CPU: ▼15.54ms] Passed 4 tests

A check of server-side resources used by Preloader
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0137.73 ▼11.66
Dashboard /wp-admin3.31 ▼0.0350.63 ▼20.13
Posts /wp-admin/edit.php3.37 ▲0.0148.38 ▼12.30
Add New Post /wp-admin/post-new.php5.90 ▲0.0186.61 ▼18.06
Media Library /wp-admin/upload.php3.24 ▲0.0133.33 ▼2.79
Preloader /wp-admin/plugins.php?page=WPTime_preloader_settings3.2032.58

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 12 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
wptpreloader_screen
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Preloader
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,880 ▲11913.84 ▼0.518.56 ▲6.3943.65 ▼7.55
Dashboard /wp-admin2,202 ▲315.62 ▼0.0894.67 ▼9.1341.65 ▼0.94
Posts /wp-admin/edit.php2,104 ▲12.03 ▲0.0236.43 ▼6.3734.85 ▼3.15
Add New Post /wp-admin/post-new.php1,531 ▲323.05 ▼0.02624.81 ▼23.1047.86 ▼8.92
Media Library /wp-admin/upload.php1,407 ▲134.13 ▼0.10100.62 ▼0.7442.59 ▼3.32
Preloader /wp-admin/plugins.php?page=WPTime_preloader_settings1,0232.0423.8838.08

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • 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 | 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
Please fix the following
  • 3× PHP files output text when accessed directly:
    • > /wp-content/plugins/the-preloader/uninstall.php
    • > /wp-content/plugins/the-preloader/settings.php
    • > /wp-content/plugins/the-preloader/preloader.php

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

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
5 plugin tags: preload, loader, preloader, load, loading

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

This is the main PHP file of "Preloader" version 1.0.9, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("the-preloader.php" instead of "preloader.php")

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
No dangerous file extensions were detected314 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP47235307
JavaScript1307

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.64
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%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
1 PNG file occupies 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
banner/bh.png13.73KB4.93KB▼ 64.11%