79% admiral-adblock-suite

Code Review | Admiral Adblock Analytics

WordPress plugin Admiral Adblock Analytics scored79%from 54 tests.

About plugin

  • Plugin page: admiral-adblock-s...
  • Plugin version: 1.9.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.3
  • WordPress version: 6.3.1
  • First release: Jun 4, 2016
  • Latest release: Oct 20, 2023
  • Number of updates: 36
  • Update frequency: every 76.6 days
  • Top authors: getadmiral (97.22%)markadmiral (5.56%)

Code review

54 tests

User reviews

11 reviews

Install metrics

200+ active /12,788 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.08MB] [CPU: ▼4.07ms] 75% from 4 tests

Analyzing server-side resources used by Admiral Adblock Analytics
Please fix the following
  • CPU: The total CPU usage must kept under 500.00ms (currently 593.79ms on /wp-admin/options-general.php?page=admiral-adblock-analytics)
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1036.43 ▼6.51
Dashboard /wp-admin3.40 ▲0.0551.79 ▼9.50
Posts /wp-admin/edit.php3.52 ▲0.1648.72 ▲4.28
Add New Post /wp-admin/post-new.php5.98 ▲0.0984.93 ▼4.53
Media Library /wp-admin/upload.php3.33 ▲0.0939.27 ▲5.88
Admiral /wp-admin/options-general.php?page=admiral-adblock-analytics3.31593.79

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 13 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Admiral Adblock Analytics
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,802 ▲5614.72 ▲0.501.71 ▼0.0038.30 ▼4.85
Dashboard /wp-admin2,202 ▲255.55 ▲0.0082.29 ▼19.9338.55 ▼3.63
Posts /wp-admin/edit.php2,101 ▲11.97 ▼0.0632.94 ▼2.3139.28 ▲8.65
Add New Post /wp-admin/post-new.php1,534 ▼123.16 ▲4.95647.04 ▼28.6054.94 ▼13.01
Media Library /wp-admin/upload.php1,407 ▲104.21 ▲0.01101.43 ▼0.4443.53 ▼0.82
Admiral /wp-admin/options-general.php?page=admiral-adblock-analytics8891.9722.9424.41

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Everything seems fine, however this is by no means an exhaustive test

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

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 need to be fixed:
  • Tags: There are too many tags (13 tag instead of maximum 10)
Please take inspiration from this readme.txt

admiral-adblock-suite/index.php 92% from 13 tests

"Admiral Adblock Analytics" version 1.9.2'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: Please rename the main PHP file in this plugin to the plugin slug ("admiral-adblock-suite.php" instead of "index.php")

Code Analysis 5% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
These items require your attention
  • Do not include executable or dangerous files in your plugin
    • .crt - Security Certificate in Firefox, IE, Chrome, Safari
      • wp-content/plugins/admiral-adblock-suite/caroots.crt
778 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP487130778

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity45.00
▷ Minimum class complexity45.00
▷ Maximum class complexity45.00
Average method complexity3.16
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods20
▷ Static methods20100.00%
▷ Public methods1260.00%
▷ Protected methods00.00%
▷ Private methods840.00%
Functions17
▷ Named functions952.94%
▷ Anonymous functions847.06%
Constants7
▷ Global constants00.00%
▷ Class constants7100.00%
▷ Public constants7100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
7 PNG files occupy 1.24MB with 0.64MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/icon-256x256.png10.09KB4.43KB▼ 56.05%
assets/images/admiral-logo.png15.33KB11.86KB▼ 22.67%
assets/icon-128x128.png6.05KB2.76KB▼ 54.45%
assets/screenshot-1.png44.45KB13.93KB▼ 68.66%
assets/screenshot-2.png286.24KB122.77KB▼ 57.11%