10% ampedsense-adsense-split-tester

Code Review | AmpedSense - AdSense Split Tester

WordPress plugin AmpedSense - AdSense Split Tester scored10%from 54 tests.

About plugin

  • Plugin page: ampedsense-adsens...
  • Plugin version: 4.68
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-4.6.1
  • WordPress version: 6.3.1
  • First release: Dec 14, 2015
  • Latest release: Dec 5, 2016
  • Number of updates: 44
  • Update frequency: every 9.2 days
  • Top authors: shanelabs (93.18%)ezoic (9.09%)

Code review

54 tests

User reviews

3 reviews

Install metrics

80+ active /10,328 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The following installer errors require your attention
  • Install procedure had errors
    • > Notice in wp-content/plugins/ampedsense-adsense-split-tester/amped-sense.php+140
    Trying to access array offset on value of type bool

Server metrics [RAM: ▲0.31MB] [CPU: ▼3.29ms] Passed 4 tests

Analyzing server-side resources used by AmpedSense - AdSense Split Tester
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.80 ▲0.3342.54 ▼1.68
Dashboard /wp-admin3.62 ▲0.3150.86 ▼5.02
Posts /wp-admin/edit.php3.73 ▲0.3755.01 ▲3.09
Add New Post /wp-admin/post-new.php6.20 ▲0.3188.89 ▼5.32
Media Library /wp-admin/upload.php3.54 ▲0.3138.66 ▼1.14
Segments /wp-admin/admin.php?page=ampedsense-segments3.5635.38
Settings /wp-admin/admin.php?page=ampedsense-settings3.5332.75
Split Tests /wp-admin/admin.php?page=ampedsense-main3.8835.31

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 37 new files
Database: no new tables, 13 new options
New WordPress options
widget_ampedsensesidebarf
widget_ampedsensesidebarb
widget_ampedsensesidebare
ampedsense_settings
can_compress_scripts
widget_recent-posts
widget_ampedsensesidebara
widget_ampedsensesidebard
theysaidso_admin_options
widget_recent-comments
...

Browser metrics Passed 4 tests

Checking browser requirements for AmpedSense - AdSense Split Tester
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,819 ▲5814.76 ▲0.032.40 ▲0.6843.51 ▲2.37
Dashboard /wp-admin2,213 ▲365.52 ▼0.1086.06 ▼13.0376.77 ▲32.44
Posts /wp-admin/edit.php2,136 ▲331.98 ▲0.0137.01 ▼3.0435.52 ▼0.55
Add New Post /wp-admin/post-new.php1,550 ▲2423.67 ▲0.04658.32 ▼23.0760.09 ▼9.10
Media Library /wp-admin/upload.php1,427 ▲244.24 ▲0.0499.89 ▼2.9667.11 ▲22.21
Segments /wp-admin/admin.php?page=ampedsense-segments9082.1337.9542.06
Settings /wp-admin/admin.php?page=ampedsense-settings1,0122.1436.0138.83
Split Tests /wp-admin/admin.php?page=ampedsense-main9412.2425.9828.61

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
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 13 options in the database
    • widget_ampedsensesidebarb
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • widget_ampedsensesidebare
    • theysaidso_admin_options
    • widget_ampedsensesidebarc
    • widget_ampedsensesidebarf
    • widget_recent-comments
    • widget_ampedsensesidebard
    • ...

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These errors were triggered by the plugin
    • > GET request to /wp-admin/admin.php?page=ampedsense-settings
    • > Notice in wp-content/plugins/ampedsense-adsense-split-tester/amped-sense.php+1012
    Undefined index: googlerefreshtoken
    • > GET request to /wp-admin/admin.php?page=ampedsense-settings
    • > Notice in wp-content/plugins/ampedsense-adsense-split-tester/settings.php+17
    Undefined index: as_googleaccesstoken
    • > GET request to /wp-admin/admin.php?page=ampedsense-settings
    • > Warning in wp-content/plugins/ampedsense-adsense-split-tester/settings.php+19
    count(): Parameter must be an array or an object that implements Countable

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
  • 4× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/ampedsense-adsense-split-tester/segments.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/ampedsense-adsense-split-tester/settings.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/ampedsense-adsense-split-tester/amped-sense.php:1527
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/ampedsense-adsense-split-tester/main.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 96% 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
4 plugin tags: advertising, adsense, google, ads

ampedsense-adsense-split-tester/amped-sense.php 92% from 13 tests

The main file in "AmpedSense - AdSense Split Tester" v. 4.68 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please make the necessary changes and fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("ampedsense-adsense-split-tester.php" instead of "amped-sense.php")

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 detected11,158 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
CSS334577,143
PHP54009843,029
JavaScript216968986

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.69
Average class complexity49.67
▷ Minimum class complexity2.00
▷ Maximum class complexity239.00
Average method complexity5.92
▷ Minimum method complexity1.00
▷ Maximum method complexity77.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes00.00%
Methods89
▷ Static methods910.11%
▷ Public methods8797.75%
▷ Protected methods22.25%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants9
▷ Global constants00.00%
▷ Class constants9100.00%
▷ Public constants9100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
24 PNG files occupy 0.05MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
resources/logo.png3.56KB2.85KB▼ 20.09%
resources/hv.png2.80KB7.32KB0.00%
resources/ui-bg_glass_75_e6e6e6_1x400.png0.31KB0.18KB▼ 39.81%
resources/edit.png0.44KB0.25KB▼ 42.95%
resources/notes.png0.57KB0.38KB▼ 33.16%