61% adsensei-b30

Code Review | Adsmonetizer

WordPress plugin Adsmonetizer scored61%from 54 tests.

About plugin

  • Plugin page: adsensei-b30
  • Plugin version: 3.1.2
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: May 12, 2016
  • Latest release: Sep 5, 2023
  • Number of updates: 114
  • Update frequency: every 23.4 days
  • Top authors: marquesdecarabas (61.4%)info2000 (33.33%)naucode (7.02%)

Code review

54 tests

User reviews

26 reviews

Install metrics

5,000+ active /116,489 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.12MB] [CPU: ▼9.44ms] Passed 4 tests

An overview of server-side resources used by Adsmonetizer
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.86 ▲0.4048.79 ▲4.13
Dashboard /wp-admin3.41 ▲0.1040.93 ▼14.11
Posts /wp-admin/edit.php3.50 ▲0.1445.75 ▼4.34
Add New Post /wp-admin/post-new.php5.93 ▲0.0484.35 ▼18.42
Media Library /wp-admin/upload.php3.43 ▲0.2036.75 ▼0.87
Switch to New Interface /wp-admin/admin.php?page=adsensei_switch_to_new3.3936.14
Ad Settings /wp-admin/admin.php?page=adsensei-settings3.4540.57

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 325 new files
Database: 2 new tables, 13 new options
New tables
wp_adsensei_stats
wp_adsensei_single_stats_
New WordPress options
adsensei-mode
adsensei_import_classic_ads_popup
adsenseiAdResetDeleted
theysaidso_admin_options
adsenseiAdReset_optionsDeleted
widget_adsensei_ads_widget
widget_recent-posts
widget_theysaidso_widget
db_upgraded
adsenseiAdReset
...

Browser metrics Passed 4 tests

An overview of browser requirements for Adsmonetizer
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,116 ▲35513.95 ▼0.409.38 ▲7.5137.90 ▼7.56
Dashboard /wp-admin2,374 ▲1944.87 ▼0.7997.28 ▲4.7742.66 ▲1.32
Posts /wp-admin/edit.php2,280 ▲1772.53 ▲0.5643.31 ▲5.6438.61 ▲2.34
Add New Post /wp-admin/post-new.php6,343 ▲4,80319.21 ▲1.03841.09 ▲191.6238.68 ▼22.47
Media Library /wp-admin/upload.php1,570 ▲1704.44 ▲0.22105.31 ▼1.5649.26 ▲5.42
Switch to New Interface /wp-admin/admin.php?page=adsensei_switch_to_new2,90016.91490.62106.92
Ad Settings /wp-admin/admin.php?page=adsensei-settings1,92615.07535.8760.94

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • Zombie tables detected upon uninstall: 2 tables
    • wp_adsensei_single_stats_
    • wp_adsensei_stats
  • Zombie WordPress options were found after uninstall: 13 options
    • widget_theysaidso_widget
    • adsensei_import_classic_ads_popup
    • widget_adsensei_ads_widget
    • widget_recent-comments
    • widget_recent-posts
    • adsensei_settings
    • can_compress_scripts
    • adsensei-mode
    • db_upgraded
    • adsenseiAdReset_optionsDeleted
    • ...

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
These errors were triggered by the plugin
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=adsensei-settings
    • > Notice in wp-content/plugins/adsensei-b30/includes/scripts.php+174
    Trying to get property 'data' of non-object
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=adsensei-settings
    • > Notice in wp-content/plugins/adsensei-b30/includes/scripts.php+174
    Trying to get property 'signupURL' of non-object

SRP 0% 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
  • 5× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/adsensei-b30/includes/vendor/vi/views/error.php
    • > /wp-content/plugins/adsensei-b30/includes/vendor/vi/views/partials/footer.php
    • > /wp-content/plugins/adsensei-b30/includes/vendor/vi/views/signup.php
    • > /wp-content/plugins/adsensei-b30/includes/vendor/vi/views/notices.php
    • > /wp-content/plugins/adsensei-b30/includes/vendor/vi/views/partials/header.php
  • 71× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'wpadsensei\\Forms\\Elements' not found in wp-content/plugins/adsensei-b30/includes/admin/Forms/Elements/Date.php:10
    • > PHP Notice
      Undefined variable: loginAPI in wp-content/plugins/adsensei-b30/includes/vendor/vi/views/not_logged_in.php on line 28
    • > PHP Fatal error
      Uncaught Error: Call to undefined function ElementorAdsensei\\add_action() in wp-content/plugins/adsensei-b30/includes/elementor/widget.php:30
    • > PHP Fatal error
      Uncaught Error: Class 'wpadsensei\\adSettings' not found in wp-content/plugins/adsensei-b30/includes/vendor/vi/views/ad_settings.php:12
    • > PHP Notice
      Undefined variable: demoPageURL in wp-content/plugins/adsensei-b30/includes/vendor/vi/views/login.php on line 21
    • > PHP Fatal error
      Uncaught Error: Class 'wpadsensei\\Elements' not found in wp-content/plugins/adsensei-b30/includes/Forms/Elements/TextAreaHidden.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'wpadsensei\\Elements' not found in wp-content/plugins/adsensei-b30/includes/Forms/Elements/DateTime.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function bloginfo() in wp-content/plugins/adsensei-b30/includes/vendor/vi/views/login.php:29
    • > PHP Fatal error
      Uncaught Error: Call to a member function getRevenue() on null in wp-content/plugins/adsensei-b30/includes/vendor/vi/views/revenue.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'wpadsensei\\ElementsWithOptions' not found in wp-content/plugins/adsensei-b30/includes/Forms/Elements/Radio.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that need to be fixed:
  • Requires at least: Invalid plugin version format
  • Contributors: The plugin contributors field is missing
Please take inspiration from this readme.txt

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

This is the main PHP file of "Adsmonetizer" version 3.1.2, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("adsensei-b30.php" instead of "adSenseiB30.php")

Code Analysis 97% from 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 detected136,926 lines of code in 197 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript441,054968104,999
PHP1274,5046,42722,646
CSS131,0604506,823
PO File75135311,348
JSX11063818
JSON200275
Sass31117

PHP code 50% from 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
These items need your attention
  • Cyclomatic complexity of methods has to be reduced to less than 100 (currently 109)
Cyclomatic complexity
Average complexity per logical line of code0.49
Average class complexity23.89
▷ Minimum class complexity1.00
▷ Maximum class complexity310.00
Average method complexity4.32
▷ Minimum method complexity1.00
▷ Maximum method complexity109.00
Code structure
Namespaces10
Interfaces4
Traits0
Classes78
▷ Abstract classes56.41%
▷ Concrete classes7393.59%
▷ Final classes00.00%
Methods618
▷ Static methods345.50%
▷ Public methods51282.85%
▷ Protected methods426.80%
▷ Private methods6410.36%
Functions418
▷ Named functions37990.67%
▷ Anonymous functions399.33%
Constants34
▷ Global constants926.47%
▷ Class constants2573.53%
▷ Public constants25100.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
105 PNG files occupy 1.10MB with 0.50MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/banner-772x250.png52.69KB13.48KB▼ 74.42%
admin/assets/js/src/images/skip_ads_icon.png2.41KB1.55KB▼ 35.72%
assets/images/align_right.png1.10KB0.19KB▼ 82.76%
admin/assets/js/src/images/double_click_icon.png2.11KB1.64KB▼ 22.49%
admin/assets/js/src/images/ad_blindness_icon.png1.64KB1.41KB▼ 13.83%