68% advertpreloader

Code Review | Advert Preloader

WordPress plugin Advert Preloader scored 68% from 54 tests.

About plugin

  • Plugin page: advertpreloader
  • Plugin version: 0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.6
  • WordPress version: 6.3.1
  • First release: Jul 24, 2014
  • Latest release: Jul 26, 2014
  • Number of updates: 15
  • Update frequency: every 0.1 days
  • Top authors: ivan.m89 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,387 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▼0.94MB] [CPU: ▼32.36ms] Passed 4 tests

An overview of server-side resources used by Advert Preloader
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0237.62 ▼12.98
Dashboard /wp-admin3.00 ▼0.3022.92 ▼27.26
Posts /wp-admin/edit.php3.00 ▼0.3624.14 ▼18.89
Add New Post /wp-admin/post-new.php3.00 ▼2.8924.88 ▼70.32
Media Library /wp-admin/upload.php3.00 ▼0.2321.23 ▼10.21

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Advert Preloader
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,924 ▲17814.02 ▼0.376.33 ▲4.0444.18 ▼2.00
Dashboard /wp-admin2,225 ▲344.89 ▲0.0199.79 ▼4.7038.93 ▼4.00
Posts /wp-admin/edit.php2,105 ▲162.04 ▼0.0034.09 ▼3.6734.24 ▲0.84
Add New Post /wp-admin/post-new.php6,479 ▲4,94520.21 ▼2.82894.14 ▲207.8366.89 ▲9.99
Media Library /wp-admin/upload.php1,407 ▲194.23 ▲0.0197.59 ▼8.0743.90 ▲0.56

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Uninstall procedure had uncaught errors
    • > Notice in wp-content/plugins/advertpreloader/index.php+27
    Undefined index: page
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • advert_preloader_all_options
    • widget_theysaidso_widget

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)
Even though everything seems fine, this is not an exhaustive test

SRP 0% 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
Almost there! Just fix the following items
  • 2× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/advertpreloader/templates/header_tpl.php
    • > /wp-content/plugins/advertpreloader/templates/footer_tpl.php
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/advertpreloader/index.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/advertpreloader/templates/home_tpl.php:8

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need your attention:
  • Donate link: Invalid URI ("")
The official readme.txt is a good inspiration

advertpreloader/index.php 85% from 13 tests

The main file in "Advert Preloader" v. 0.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 252 characters long)
  • Main file name: The principal plugin file should be the same as the plugin slug ("advertpreloader.php" instead of "index.php")

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
There were no executable files found in this plugin577 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP59381310
HTML1100106
CSS22572
PO File1272766
JavaScript29523

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.44
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%
Functions12
▷ Named functions12100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG images were found in this plugin