77% custom-preloader

Code Review | Custom Preloader

WordPress plugin Custom Preloader scored77%from 54 tests.

About plugin

  • Plugin page: custom-preloader
  • Plugin version: 2.0
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Dec 9, 2014
  • Latest release: Feb 8, 2018
  • Number of updates: 96
  • Update frequency: every 12.1 days
  • Top authors: NikosTsolakos (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

100+ active /13,920 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
Installer ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼2.95ms] Passed 4 tests

Server-side resources used by Custom Preloader
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0236.08 ▼4.80
Dashboard /wp-admin3.35 ▲0.0548.41 ▼1.71
Posts /wp-admin/edit.php3.47 ▲0.1251.63 ▲6.20
Add New Post /wp-admin/post-new.php5.91 ▲0.0383.58 ▼5.06
Media Library /wp-admin/upload.php3.26 ▲0.0335.41 ▼0.21
Custom Preloader /wp-admin/options-general.php?page=Custom_Preloader3.2230.98

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Custom Preloader
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,022 ▲26515.40 ▲1.034.57 ▲2.5537.11 ▼11.61
Dashboard /wp-admin2,350 ▲1596.43 ▲0.52133.13 ▲31.2141.76 ▲0.34
Posts /wp-admin/edit.php2,256 ▲1673.33 ▲1.3054.39 ▲17.9535.79 ▲5.70
Add New Post /wp-admin/post-new.php1,536 ▲323.19 ▲0.10585.82 ▼69.6034.29 ▼26.77
Media Library /wp-admin/upload.php1,389 ▲14.15 ▲0.0383.28 ▼15.8842.55 ▼0.91
Custom Preloader /wp-admin/options-general.php?page=Custom_Preloader1,8843.6352.93120.93

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Smoke test failed, please fix the following
    • > GET request to /wp-admin/options-general.php?page=Custom_Preloader
    • > Notice in wp-content/plugins/custom-preloader/preloader.php+148
    Undefined variable: plugin_dir

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
Almost there! Just fix the following items
  • 8× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_die() in wp-content/plugins/custom-preloader/js/index.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_die() in wp-content/plugins/custom-preloader/css/index.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_die() in wp-content/plugins/custom-preloader/index.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_die() in wp-content/plugins/custom-preloader/images/index.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/custom-preloader/preloader.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/custom-preloader/include/frontend.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_die() in wp-content/plugins/custom-preloader/include/index.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/custom-preloader/include/functions.php:377

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that require attention:
  • Requires at least: Invalid version format
  • Tags: Please delete some tags, you are using 13 tag instead of maximum 10
You can look at the official readme.txt

custom-preloader/preloader.php 85% from 13 tests

"Custom Preloader" version 2.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
You should first fix the following items:
  • Description: Please don't use more than 140 characters for the plugin description (currently 182 characters long)
  • Main file name: Name the main plugin file the same as the plugin slug ("custom-preloader.php" instead of "preloader.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Success! There were no dangerous files found in this plugin4,057 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript65112872,327
PHP59463872
CSS29538858

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.21
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%
Functions30
▷ Named functions30100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
2 PNG files occupy 0.12MB with 0.07MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/custom-preloader-logo.png50.00KB23.75KB▼ 52.50%
images/custom-preloader-cover.png72.76KB23.80KB▼ 67.29%