10% ab-tests-site-section

Code Review | A/B Tests Site Section

WordPress plugin A/B Tests Site Section scored10%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: 6.3.1
  • 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 /967 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
It is recommended to fix the following installer errors
  • The plugin did not install without errors
    • > Notice in wp-content/plugins/ab-tests-site-section/abtss.php+57
    Undefined variable: _SESSION

Server metrics [RAM: ▼1.92MB] [CPU: ▼58.90ms] Passed 4 tests

Analyzing server-side resources used by A/B Tests Site Section
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.06 ▼1.404.92 ▼39.60
Dashboard /wp-admin2.08 ▼1.225.97 ▼44.16
Posts /wp-admin/edit.php2.08 ▼1.276.08 ▼46.17
Add New Post /wp-admin/post-new.php2.08 ▼3.807.40 ▼105.68
Media Library /wp-admin/upload.php2.08 ▼1.147.63 ▼28.32
A/B Site Section /wp-admin/options-general.php?page=abtss2.085.91

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 3 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
redirect_requests
widget_recent-posts

Browser metrics Passed 4 tests

A/B Tests Site Section: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,819 ▲5814.32 ▲0.042.06 ▲0.3644.36 ▲1.10
Dashboard /wp-admin2,225 ▲224.86 ▼1.20113.67 ▲10.9142.72 ▲0.82
Posts /wp-admin/edit.php2,107 ▲42.05 ▲0.0136.90 ▼4.7635.68 ▼0.50
Add New Post /wp-admin/post-new.php1,547 ▼722.00 ▲3.48642.76 ▲11.6552.03 ▼2.79
Media Library /wp-admin/upload.php1,404 ▲14.21 ▼0.01100.80 ▼0.1946.55 ▲0.99
A/B Site Section /wp-admin/options-general.php?page=abtss8332.0122.9927.98

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • The plugin did not uninstall gracefully
    • > Notice in wp-content/plugins/ab-tests-site-section/abtss.php+57
    Undefined variable: _SESSION
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • redirect_requests
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Almost there, just fix the following server-side errors
    • > 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+5463
    Function 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+5463
    Function 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
Almost there! Just fix the following items
  • 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 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
5 plugin tags: ab, site, ab testing, testing, section

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

The primary PHP file in "A/B Tests Site Section" version 0.1 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as 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
Good job! No executable or dangerous file extensions detected106 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP27111106

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
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

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG images were found in this plugin