84% zd-pre-loader

Code Review | ZD Pre Loader

WordPress plugin ZD Pre Loader scored84%from 54 tests.

About plugin

  • Plugin page: zd-pre-loader
  • Plugin version: 2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.4.1
  • WordPress version: 6.3.1
  • First release: Jul 22, 2014
  • Latest release: Feb 14, 2016
  • Number of updates: 10
  • Update frequency: every 57.1 days
  • Top authors: zakirbd63 (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

200+ active /8,531 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.08MB] [CPU: ▼4.74ms] Passed 4 tests

Server-side resources used by ZD Pre Loader
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0742.25 ▲2.49
Dashboard /wp-admin3.39 ▲0.0944.31 ▼3.10
Posts /wp-admin/edit.php3.50 ▲0.1544.17 ▲0.27
Add New Post /wp-admin/post-new.php5.97 ▲0.0880.29 ▼14.19
Media Library /wp-admin/upload.php3.31 ▲0.0835.00 ▼1.93
ZD Preload Options /wp-admin/options-general.php?page=settings_api_test3.2829.28

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 5 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
tatom_basics
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by ZD Pre Loader
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,975 ▲22913.97 ▼0.626.93 ▲5.1544.46 ▼1.06
Dashboard /wp-admin2,227 ▲355.09 ▲0.13110.33 ▼10.6739.41 ▼4.36
Posts /wp-admin/edit.php2,112 ▲262.31 ▲0.3034.51 ▲1.0332.83 ▼1.90
Add New Post /wp-admin/post-new.php1,543 ▲1023.25 ▲0.18663.92 ▼3.8438.42 ▼27.46
Media Library /wp-admin/upload.php1,412 ▲214.36 ▲0.15111.80 ▲12.8247.85 ▲5.35
ZD Preload Options /wp-admin/options-general.php?page=settings_api_test1,0822.3056.0831.03

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • This plugin does not fully uninstall, leaving 7 options in the database
    • tatom_basics
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options

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 no errors were found, 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
The following issues need your attention
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/zd-pre-loader/output-setting.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/zd-pre-loader/output-setting.php:14

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 93% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that require attention:
  • Screenshots: Screenshot #1 (ZD Pre Loading Effect in Site) image missing
The official readme.txt might help

zd-pre-loader/plugin-hook.php 92% from 13 tests

"ZD Pre Loader" version 2.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("zd-pre-loader.php" instead of "plugin-hook.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin456 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP3139187456

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity23.50
▷ Minimum class complexity3.00
▷ Maximum class complexity44.00
Average method complexity2.45
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods31
▷ Static methods00.00%
▷ Public methods31100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions5100.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
There are no PNG files in this plugin