78% ultimate-preloader

Code Review | Ultimate Preloader

WordPress plugin Ultimate Preloader scored78%from 54 tests.

About plugin

  • Plugin page: ultimate-preloader
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-3.5
  • WordPress version: 6.3.1
  • First release: Feb 13, 2013
  • Latest release: Feb 14, 2013
  • Number of updates: 13
  • Update frequency: every 0.2 days
  • Top authors: enid.colic (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

100+ active /10,596 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼2.51ms] Passed 4 tests

This is a short check of server-side resources used by Ultimate Preloader
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0139.27 ▼0.86
Dashboard /wp-admin3.33 ▲0.0250.06 ▼6.06
Posts /wp-admin/edit.php3.38 ▲0.0250.40 ▼2.70
Add New Post /wp-admin/post-new.php5.93 ▲0.0488.24 ▼0.43
Media Library /wp-admin/upload.php3.25 ▲0.0234.39 ▲1.09
Ultimate Preloader /wp-admin/options-general.php?page=UltimatePreloader3.2234.83

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 12 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
up_opts
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Ultimate Preloader
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,967 ▲22113.62 ▼1.0715.14 ▲13.4645.32 ▲0.54
Dashboard /wp-admin2,210 ▲224.84 ▼0.0898.47 ▼14.8040.83 ▼11.38
Posts /wp-admin/edit.php2,093 ▲42.05 ▲0.0435.93 ▼4.6334.82 ▼2.82
Add New Post /wp-admin/post-new.php1,538 ▲1023.16 ▲4.85664.21 ▲26.5053.40 ▲1.37
Media Library /wp-admin/upload.php1,392 ▲74.24 ▲0.02101.53 ▼2.9746.10 ▲2.40
Ultimate Preloader /wp-admin/options-general.php?page=UltimatePreloader1,1562.2863.4234.88

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
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded

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)
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/ultimate-preloader/ultimate_preloader.php:12

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Please fix the following browser errors
    • > GET request to /wp-admin/options-general.php?page=UltimatePreloader
    • > Network (severe)
    wp-content/plugins/ultimate_preloader/images/empty.png - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Please fix the following attributes:
  • Screenshots: Screenshot #4 (Plugin options 2) image missing
Please take inspiration from this readme.txt

ultimate-preloader/ultimate_preloader.php 85% from 13 tests

This is the main PHP file of "Ultimate Preloader" version 1.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("ultimate-preloader.php" instead of "ultimate_preloader.php")
  • Description: Please don't use more than 140 characters for the plugin description (currently 237 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected740 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP17917386
JavaScript3553343
CSS20011

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.28
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%
Functions29
▷ Named functions29100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
5 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/checkbox.png2.95KB2.90KB▼ 1.75%
images/icon-small.png1.00KB0.88KB▼ 12.26%
images/icon.png2.43KB1.58KB▼ 35.06%
images/background.png4.96KB2.59KB▼ 47.82%
images/empty.png0.13KB0.09KB▼ 30.66%