84% wpcustom-preloader

Code Review | Custom Preloader

WordPress plugin Custom Preloader scored 84% from 54 tests.

About plugin

  • Plugin page: wpcustom-preloader
  • Plugin version: 1.0
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4.0-6.0
  • WordPress version: 6.3.1
  • First release: Jul 8, 2022
  • Latest release: Jul 8, 2022
  • Number of updates: 4
  • Update frequency: every 0.3 days
  • Top authors: rajanzeus (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

30+ active / 984 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.05MB] [CPU: ▼2.11ms] Passed 4 tests

Analyzing server-side resources used by Custom Preloader
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0641.85 ▼0.40
Dashboard /wp-admin3.35 ▲0.0545.31 ▼1.77
Posts /wp-admin/edit.php3.41 ▲0.0547.46 ▲1.51
Add New Post /wp-admin/post-new.php5.93 ▲0.0592.43 ▼7.77
Media Library /wp-admin/upload.php3.28 ▲0.0535.26 ▲3.05
WP Preloader /wp-admin/plugins.php?page=wcp_WPCustom_preloader_settings3.2430.42

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 14 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
wpcustompreloader_screen
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

Custom 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,918 ▲18313.57 ▼1.056.13 ▲4.2344.07 ▼6.95
Dashboard /wp-admin2,212 ▲244.85 ▼0.9796.71 ▼1.2041.12 ▼6.04
Posts /wp-admin/edit.php2,098 ▲91.97 ▼0.0741.42 ▲4.6535.24 ▼1.86
Add New Post /wp-admin/post-new.php1,533 ▼023.30 ▲0.11597.63 ▼33.7452.51 ▼0.53
Media Library /wp-admin/upload.php1,397 ▲94.19 ▼0.0393.52 ▼1.7443.31 ▲3.09
WP Preloader /wp-admin/plugins.php?page=wcp_WPCustom_preloader_settings9552.0724.4531.28

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

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

Smoke tests 75% 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 50% 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 take a closer look at the following
  • 3× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/wpcustom-preloader/uninstall.php
    • > /wp-content/plugins/wpcustom-preloader/settings.php
    • > /wp-content/plugins/wpcustom-preloader/wpcustom-preloader.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
5 plugin tags: load, loader, preloader, loading, preload

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

The main PHP script in "Custom Preloader" version 1.0 is automatically included on every request by WordPress
73 characters long description:
Add preloader to your website easily, compatible with all major browsers.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected324 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP43721259
CSS12058
JavaScript1307

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.58
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%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
2 compressed PNG files occupy 0.02MB
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
banner/wpcustom.png4.26KB4.13KB▼ 2.94%
banner/wpcustom-dark.png14.72KB13.69KB▼ 7.06%