42% preloading

Code Review | Preloading

WordPress plugin Preloading scored42%from 54 tests.

About plugin

  • Plugin page: preloading
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.6
  • WordPress version: 6.3.1
  • First release: Aug 5, 2013
  • Latest release: Aug 5, 2013
  • Number of updates: 3
  • Update frequency: every 0.3 days
  • Top authors: BhardwajAmmy (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

30+ active /5,979 total downloads

Benchmarks

Plugin footprint 30% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.18MB] [CPU: ▼0.88ms] Passed 4 tests

An overview of server-side resources used by Preloading
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.64 ▲0.1745.09 ▲0.23
Dashboard /wp-admin3.51 ▲0.1651.38 ▼12.42
Posts /wp-admin/edit.php3.62 ▲0.2656.08 ▲6.33
Add New Post /wp-admin/post-new.php6.09 ▲0.20102.86 ▲2.36
Media Library /wp-admin/upload.php3.43 ▲0.2043.45 ▲8.02

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 30 new files
Database: 1 new table, 8 new options
New tables
wp_tbpl_ips
New WordPress options
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
pre_loading_options
pre_loading_config
widget_recent-posts
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for Preloading
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,799 ▲3814.23 ▼0.391.84 ▲0.0745.60 ▲1.63
Dashboard /wp-admin2,196 ▲165.55 ▼0.1388.72 ▼9.4437.85 ▼7.90
Posts /wp-admin/edit.php2,107 ▲72.17 ▲0.1740.17 ▲0.5035.19 ▼0.43
Add New Post /wp-admin/post-new.php1,553 ▲823.23 ▼0.20661.69 ▲14.4057.59 ▲2.53
Media Library /wp-admin/upload.php1,407 ▲104.22 ▼0.1195.72 ▼11.3547.35 ▲5.51
Pre Loading /wp-admin/pre_loading_options.php260.440.1015.43

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • Uninstall procedure had uncaught errors
    • > Notice in wp-content/plugins/preloading/uninstall.php+14
    Undefined variable: wpdb
  • The plugin did not uninstall successfully, leaving 30 files (0.12MB) in the plugin directory
    • (new file) inc/preview-ajax.php
    • (new file) inc/activation.php
    • (new file) inc/mobile-detect/Mobile_Detect.php
    • (new file) inc/admin/style.css
    • (new file) inc/mobile-detect/LICENSE.txt
    • (new file) inc/mobile-detect/.travis.yml
    • (new file) inc/class-pre-loading.php
    • (new file) inc/mobile-detect/composer.json
    • (new file) inc/admin/class-pre-loading-admin.php
    • (new file) init.php
    • ...
  • The plugin did not uninstall successfully, leaving 1 table in the database
    • wp_tbpl_ips
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • recovery_mode_email_last_sent
    • theysaidso_admin_options

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 0% 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 take a closer look at the following
  • 2× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/preloading/templates/fullwindow-video/footer.php
    • > /wp-content/plugins/preloading/templates/default/footer.php
  • 9× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function language_attributes() in wp-content/plugins/preloading/templates/default/header.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function language_attributes() in wp-content/plugins/preloading/templates/fullwindow-video/header.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/preloading/tbpl-config.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function language_attributes() in wp-content/plugins/preloading/templates/default/header.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/preloading/inc/admin/class-pre-loading-admin.php:622
    • > PHP Fatal error
      Uncaught Error: Call to undefined function tbpl_import_class() in wp-content/plugins/preloading/inc/class-pre-loading.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/preloading/tbpl-config.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/preloading/inc/activation.php:65
    • > PHP Fatal error
      Uncaught Error: Call to undefined function language_attributes() in wp-content/plugins/preloading/templates/fullwindow-video/header.php:2

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Please fix the following browser errors
    • > GET request to /wp-admin/pre_loading_options.php
    • > Network (severe)
    wp-admin/pre_loading_options.php - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
7 plugin tags: age confirmation, pre loading page, pre loader, preloader page, splash page...

preloading/init.php 85% from 13 tests

"Preloading" version 1.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 216 characters long)
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("preloading.php" instead of "init.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
Everything looks great! No dangerous files found in this plugin1,805 lines of code in 26 files:
LanguageFilesBlank linesComment linesLines of code
PHP135312971,268
CSS3284208
JavaScript7820150
PO File176100147
JSON10022
YAML13010

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.54
Average class complexity70.33
▷ Minimum class complexity48.00
▷ Maximum class complexity108.00
Average method complexity5.33
▷ Minimum method complexity1.00
▷ Maximum method complexity58.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods48
▷ Static methods00.00%
▷ Public methods3879.17%
▷ Protected methods00.00%
▷ Private methods1020.83%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants685.71%
▷ Class constants114.29%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG images were found in this plugin