10% ab-tests-site-section

Code Review | A/B Tests Site Section

WordPress plugin A/B Tests Site Section scored 10% from 54 tests.

About plugin

  • Plugin page: ab-tests-site-sec...
  • Plugin version: 0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.5
  • WordPress version: 5.9.2
  • First release: Aug 11, 2014
  • Latest release: Dec 7, 2015
  • Number of updates: 5
  • Update frequency: every 96.6 days
  • Top authors: theode (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 791 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
It is recommended to fix the following installer errors
  • Install procedure had errors
    • > Notice in wp-content/plugins/ab-tests-site-section/abtss.php+57
    Undefined variable: _SESSION

Server metrics [RAM: ▼2.49MB] [CPU: ▼343.04ms] Passed 4 tests

A check of server-side resources used by A/B Tests Site Section
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /1.88 ▼1.644.02 ▼47.50
Dashboard /wp-admin1.89 ▼1.514.30 ▼29.60
Posts /wp-admin/edit.php1.89 ▼1.744.27 ▼31.65
Add New Post /wp-admin/post-new.php1.89 ▼5.084.99 ▼1,263.41
Media Library /wp-admin/upload.php1.89 ▼1.403.81 ▼19.76
A/B Site Section /wp-admin/options-general.php?page=abtss1.904.38

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 3 new files
Database: no new tables, 1 new option
New WordPress options
redirect_requests

Browser metrics Passed 4 tests

Checking browser requirements for A/B Tests Site Section
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,788 ▲6615.98 ▲0.315.99 ▲0.022.38 ▲0.01
Dashboard /wp-admin2,897 ▲366.11 ▼0.05118.46 ▼18.43153.34 ▼9.99
Posts /wp-admin/edit.php2,693 ▲83.23 ▼0.0168.82 ▲1.87142.04 ▼6.39
Add New Post /wp-admin/post-new.php1,714 ▲1921.36 ▼0.20450.19 ▲18.05158.94 ▼5.15
Media Library /wp-admin/upload.php1,706 ▲85.54 ▼0.01143.50 ▼3.14185.11 ▼4.66
A/B Site Section /wp-admin/options-general.php?page=abtss1,0382.3657.0295.66

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • Uninstall procedure had uncaught errors
    • > Notice in wp-content/plugins/ab-tests-site-section/abtss.php+57
    Undefined variable: _SESSION
  • This plugin does not fully uninstall, leaving 1 option in the database
    • redirect_requests

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/options-general.php?page=abtss
    • > Notice in wp-content/plugins/ab-tests-site-section/abtss.php+57
    Undefined variable: _SESSION
    • > GET request to /wp-admin/options-general.php?page=abtss
    • > Notice in wp-content/plugins/ab-tests-site-section/abtss.php+57
    Trying to access array offset on value of type null
    • > GET request to /wp-admin/options-general.php?page=abtss
    • > User deprecated in wp-includes/functions.php+5326
    screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/options-general.php?page=abtss
    • > User deprecated in wp-includes/functions.php+5326
    get_screen_icon is deprecated since version 3.8.0 with no alternative available.

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ab-tests-site-section/abtss_admin_page.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ab-tests-site-section/abtss_admin_page.php:2

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 errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 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
5 plugin tags: site, ab, section, testing, ab testing

ab-tests-site-section/abtss.php 92% from 13 tests

This is the main PHP file of "A/B Tests Site Section" version 0.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("ab-tests-site-section.php" instead of "abtss.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected106 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP27111106

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
No PNG files were detected