10% adrotate

Code Review | AdRotate Banner Manager - The only ad manager you'll need

WordPress plugin AdRotate Banner Manager - The only ad manager you'll need scored10%from 54 tests.

About plugin

  • Plugin page: adrotate
  • Plugin version: 5.12.6
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-6.4
  • WordPress version: 6.3.1
  • First release: Jul 1, 2008
  • Latest release: Nov 6, 2023
  • Number of updates: 492
  • Update frequency: every 11.4 days
  • Top authors: adegans (74.59%)SHRIKEE (25.61%)

Code review

54 tests

User reviews

643 reviews

Install metrics

30,000+ active /3,423,416 total downloads

Benchmarks

Plugin footprint 57% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The following installer errors require your attention
  • The plugin cannot be installed
    • > Notice in wp-content/plugins/adrotate/adrotate.php+67
    Trying to access array offset on value of type bool

Server metrics [RAM: ▲0.89MB] [CPU: ▲3.06ms] Passed 4 tests

Analyzing server-side resources used by AdRotate Banner Manager - The only ad manager you'll need
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /4.38 ▲0.9247.89 ▲8.58
Dashboard /wp-admin4.22 ▲0.9257.41 ▲11.20
Posts /wp-admin/edit.php4.28 ▲0.9255.05 ▲3.15
Add New Post /wp-admin/post-new.php6.75 ▲0.8792.33 ▼6.87
Media Library /wp-admin/upload.php4.08 ▲0.8540.49 ▲7.36
Manage Adverts /wp-admin/admin.php?page=adrotate4.1042.81
Manage Schedules /wp-admin/admin.php?page=adrotate-schedules4.0940.50
Support /wp-admin/admin.php?page=adrotate-support4.1039.40
Manage Groups /wp-admin/admin.php?page=adrotate-groups4.1046.65
Statistics /wp-admin/admin.php?page=adrotate-statistics4.0740.75
Get AdRotate Pro /wp-admin/admin.php?page=adrotate-pro4.0935.34
Settings /wp-admin/admin.php?page=adrotate-settings4.0944.09
Manage Media /wp-admin/admin.php?page=adrotate-media4.0937.67

Server storage [IO: ▲2.59MB] [DB: ▲0.02MB] 67% from 3 tests

Analyzing filesystem and database footprints of this plugin
Please fix the following
  • There were 2 files (0.00KB) illegally modified outside of "wp-content/plugins/adrotate/" and "wp-content/uploads/"
    • (new file) wp-content/banners/.empty
    • (new file) wp-content/reports/.empty
Filesystem: 91 new files
Database: 7 new tables, 19 new options
New tables
wp_adrotate_groups
wp_adrotate_schedule
wp_adrotate_stats_archive
wp_adrotate_linkmeta
wp_adrotate_stats
wp_adrotate_tracker
wp_adrotate
New WordPress options
widget_adrotate_widgets
adrotate_crawlers
db_upgraded
widget_theysaidso_widget
can_compress_scripts
adrotate_hide_getpro
adrotate_geo_required
adrotate_notifications
adrotate_version
theysaidso_admin_options
...

Browser metrics Passed 4 tests

An overview of browser requirements for AdRotate Banner Manager - The only ad manager you'll need
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,917 ▲15514.36 ▼0.012.20 ▲0.1342.94 ▼0.82
Dashboard /wp-admin2,299 ▲1255.71 ▲0.1390.69 ▲0.8963.32 ▲22.22
Posts /wp-admin/edit.php2,216 ▲1162.48 ▲0.4745.91 ▲11.0234.29 ▼3.18
Add New Post /wp-admin/post-new.php6,419 ▲4,87527.80 ▲2.67860.36 ▲243.35173.35 ▲84.04
Media Library /wp-admin/upload.php1,513 ▲1134.26 ▲0.10109.05 ▲10.0567.55 ▲27.23
Manage Adverts /wp-admin/admin.php?page=adrotate1,2952.4041.7341.59
Manage Schedules /wp-admin/admin.php?page=adrotate-schedules1,2582.4735.7637.35
Support /wp-admin/admin.php?page=adrotate-support1,2112.4133.2656.95
Manage Groups /wp-admin/admin.php?page=adrotate-groups1,1812.3634.9335.46
Statistics /wp-admin/admin.php?page=adrotate-statistics1,2632.2935.5554.61
Get AdRotate Pro /wp-admin/admin.php?page=adrotate-pro1,2142.2733.2663.09
Settings /wp-admin/admin.php?page=adrotate-settings1,2812.2833.5436.53
Manage Media /wp-admin/admin.php?page=adrotate-media1,1762.4033.5242.29

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • Zombie WordPress options were found after uninstall: 7 options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_adrotate_widgets

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
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 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
Please fix the following
  • 32× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_var() on null in wp-content/plugins/adrotate/dashboard/publisher/adverts-generator.php:13
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_var() on null in wp-content/plugins/adrotate/dashboard/publisher/adverts-edit.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_nonce_field() in wp-content/plugins/adrotate/dashboard/settings/statistics.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_nonce_field() in wp-content/plugins/adrotate/dashboard/publisher/adverts-disabled.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/adrotate/dashboard/publisher/adverts-error.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/adrotate/dashboard/publisher/groups-main.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_nonce_field() in wp-content/plugins/adrotate/dashboard/settings/misc.php:13
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_var() on null in wp-content/plugins/adrotate/dashboard/publisher/groups-edit.php:14
    • > PHP Notice
      Undefined variable: wpdb in wp-content/plugins/adrotate/dashboard/publisher/adverts-generator.php on line 13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/adrotate/adrotate-block.php:23

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)
No browser issues were found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that require attention:
  • Tags: You are using too many tags: 12 tag instead of maximum 10
Please take inspiration from this readme.txt

adrotate/adrotate.php Passed 13 tests

"AdRotate Banner Manager - The only ad manager you'll need" version 5.12.6's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
89 characters long description:
Monetize your website with adverts while keeping things simple. Start making money today!

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected20,749 lines of code in 50 files:
LanguageFilesBlank linesComment linesLines of code
PO File78,37518,19714,845
PHP319969965,555
JavaScript112481261
CSS1141088

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity21.00
▷ Minimum class complexity21.00
▷ Maximum class complexity21.00
Average method complexity6.00
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions107
▷ Named functions107100.00%
▷ Anonymous functions00.00%
Constants8
▷ Global constants8100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
21 PNG files occupy 0.09MB with 0.05MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/icon-services.png8.33KB3.62KB▼ 56.54%
images/icon-contact.png4.12KB2.23KB▼ 45.83%
images/pro/demo-stats.png7.40KB3.13KB▼ 57.73%
images/date-arrow.png1.69KB0.55KB▼ 67.72%
images/pro/demo-adblock.png2.18KB1.16KB▼ 46.93%