83% radcontrol

Code Review | AdControl

WordPress plugin AdControl scored83%from 54 tests.

About plugin

  • Plugin page: radcontrol
  • Plugin version: 1.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4-5.6.1
  • WordPress version: 6.3.1
  • First release: Dec 18, 2015
  • Latest release: Feb 11, 2021
  • Number of updates: 40
  • Update frequency: every 47.1 days
  • Top authors: derekspringer (95%)rclations (7.5%)

Code review

54 tests

User reviews

5 reviews

Install metrics

200+ active /21,505 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.10MB] [CPU: ▼9.64ms] Passed 4 tests

A check of server-side resources used by AdControl
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.1142.69 ▼0.53
Dashboard /wp-admin3.42 ▲0.0750.38 ▼21.01
Posts /wp-admin/edit.php3.54 ▲0.1851.09 ▼7.19
Add New Post /wp-admin/post-new.php6.00 ▲0.1195.42 ▼9.81
Media Library /wp-admin/upload.php3.35 ▲0.1140.73 ▲8.65
AdControl /wp-admin/options-general.php?page=adcontrol3.3130.77

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for AdControl
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,803 ▲5714.72 ▲0.821.67 ▲0.2242.23 ▲5.47
Dashboard /wp-admin2,209 ▲295.62 ▼0.0492.34 ▼1.8543.69 ▼3.15
Posts /wp-admin/edit.php2,118 ▲182.04 ▲0.0339.51 ▲5.5837.30 ▲0.41
Add New Post /wp-admin/post-new.php1,549 ▲2323.27 ▲0.30685.76 ▼5.6855.08 ▲2.59
Media Library /wp-admin/upload.php1,417 ▲174.24 ▲0.0196.13 ▼5.9741.54 ▼4.29
AdControl /wp-admin/options-general.php?page=adcontrol7852.0325.6728.25

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • Zombie WordPress options were found after uninstall: 7 options
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_adcontrol_sidebar_widget
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

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
  • 5× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/radcontrol/php/widgets.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/radcontrol/adcontrol.php:32
    • > PHP Fatal error
      Uncaught Error: Class 'Jetpack' not found in wp-content/plugins/radcontrol/php/admin.php:41
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/radcontrol/php/cron.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/radcontrol/php/no-jetpack.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
3 plugin tags: ads, advertising, ad codes

radcontrol/adcontrol.php 77% from 13 tests

The main PHP script in "AdControl" version 1.5 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Description: Please keep the plugin description shorter than 140 characters (currently 165 characters long)
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("radcontrol.php" instead of "adcontrol.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Success! There were no dangerous files found in this plugin1,267 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP92144421,209
CSS171739
JavaScript14019

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.50
Average class complexity27.00
▷ Minimum class complexity1.00
▷ Maximum class complexity68.00
Average method complexity3.63
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods79
▷ Static methods2025.32%
▷ Public methods7797.47%
▷ Protected methods00.00%
▷ Private methods22.53%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants7100.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
There were not PNG files found in your plugin