88% adsensei-b30

Code Review | AdSensei B30

WordPress plugin AdSensei B30 scored 88% from 54 tests.

About plugin

  • Plugin page: adsensei-b30
  • Plugin version: 1.9.9.9
  • PHP version: 7.4.16
  • WordPress version: 5.9.2
  • First release: May 12, 2016
  • Latest release: May 4, 2021
  • Number of updates: 77
  • Update frequency: every 23.6 days
  • Top authors: marquesdecarabas (90.91%)naucode (10.39%)

Code review

54 tests

User reviews

17 reviews

Install metrics

7,000+ active / 74,811 total downloads

Benchmarks

Plugin footprint Passed 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 gracefully, with no errors

Server metrics [RAM: ▲0.39MB] [CPU: ▼303.65ms] Passed 4 tests

Server-side resources used by AdSensei B30
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.96 ▲0.4454.94 ▼23.26
Dashboard /wp-admin3.80 ▲0.3934.00 ▼0.49
Posts /wp-admin/edit.php4.02 ▲0.3843.04 ▲3.14
Add New Post /wp-admin/post-new.php7.32 ▲0.3597.46 ▼1,194.00
Media Library /wp-admin/upload.php3.75 ▲0.4527.26 ▲4.36
Text in Categories /wp-admin/admin.php?page=category-text3.6525.79
Text in Homepage /wp-admin/admin.php?page=home-text3.6424.55
Home /wp-admin/admin.php?page=ninjas-admin3.6651.48
Place your Ads /wp-admin/admin.php?page=adsensei-admin3.6531.25

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 43 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for AdSensei B30
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,807 ▲6315.80 ▲0.506.53 ▼1.322.37 ▼0.04
Dashboard /wp-admin2,936 ▲786.02 ▼0.18124.82 ▼13.76180.34 ▲19.51
Posts /wp-admin/edit.php2,736 ▲513.12 ▼0.1065.08 ▲1.20145.66 ▲3.14
Add New Post /wp-admin/post-new.php1,689 ▲5016.12 ▲0.65389.44 ▼20.78211.33 ▲45.49
Media Library /wp-admin/upload.php1,744 ▲465.51 ▼0.01128.06 ▼12.09210.54 ▲30.72
Text in Categories /wp-admin/admin.php?page=category-text2,0398.64164.46252.75
Text in Homepage /wp-admin/admin.php?page=home-text2,0608.83166.68235.66
Home /wp-admin/admin.php?page=ninjas-admin1,1732.4156.14153.17
Place your Ads /wp-admin/admin.php?page=adsensei-admin5,1512.6455.45220.56

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The plugin uninstalled successfully, without leaving any zombie files or tables

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
These errors were triggered by the plugin
  • 173 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=adsensei-admin
    • > Notice in wp-content/plugins/adsensei-b30/includes/adsb30_admin_page.php+265
    Trying to access array offset on value of type bool

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
The following issues need your attention
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/adsensei-b30/adSenseiB30.php:54

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that require attention:
  • Requires at least: The plugin version is formatted incorrectly
You can look at the official readme.txt

adsensei-b30/adSenseiB30.php 92% from 13 tests

The main PHP script in "AdSensei B30" version 1.9.9.9 is automatically included on every request by WordPress
You should first fix the following items:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("adsensei-b30.php" instead of "adSenseiB30.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected3,170 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PHP103858971,604
CSS3161881,023
PO File3162165415
JavaScript1261128

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity41.20
▷ Minimum class complexity1.00
▷ Maximum class complexity136.00
Average method complexity3.83
▷ Minimum method complexity1.00
▷ Maximum method complexity78.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods71
▷ Static methods1926.76%
▷ Public methods5476.06%
▷ Protected methods22.82%
▷ Private methods1521.13%
Functions18
▷ Named functions1477.78%
▷ Anonymous functions422.22%
Constants9
▷ Global constants00.00%
▷ Class constants9100.00%
▷ Public constants9100.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
16 PNG files occupy 0.49MB with 0.28MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/assets/adsensei.png20.31KB10.65KB▼ 47.57%
includes/assets/ninja1.png22.20KB9.15KB▼ 58.76%
includes/assets/g3772.png20.31KB10.65KB▼ 47.57%
assets/banner-772x250.png52.69KB13.48KB▼ 74.42%
includes/assets/ninja1_.png22.34KB9.15KB▼ 59.06%