72% maxab

Code Review | MaxA/B

WordPress plugin MaxA/B scored 72% from 53 tests.

About plugin

  • Plugin page: maxab
  • Plugin version: 2.2.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.2.1
  • WordPress version: 5.8.1
  • First release: Sep 13, 2011
  • Latest release: Sep 13, 2011
  • Number of updates: 7
  • Update frequency: every 16.3 days
  • Top authors: maxfoundry (100%)

Code review

53 tests

User reviews

5 reviews

Install metrics

100+ active / 9,158 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼256.57ms] Passed 4 tests

An overview of server-side resources used by MaxA/B
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.1242.39 ▲22.30
Dashboard /wp-admin3.07 ▲0.0236.76 ▲0.18
Posts /wp-admin/edit.php3.12 ▲0.0245.42 ▲6.60
Add New Post /wp-admin/post-new.php5.43 ▲0.0093.07 ▼1,023.45
Media Library /wp-admin/upload.php3.01 ▲0.0129.71 ▼9.60
Experiments /wp-admin/admin.php?page=maxab-experiment3.0127.61
FAQ /wp-admin/admin.php?page=maxab-faq3.0227.70

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 23 new files
Database: 1 new table, 1 new option
New tables
wp_maxab_experiments
New WordPress options
maxab_version

Browser metrics Passed 4 tests

Checking browser requirements for MaxA/B
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,715 ▲10916.17 ▲0.707.98 ▼2.0144.33 ▼2.34
Dashboard /wp-admin2,991 ▲1416.54 ▲0.57137.59 ▲1.19107.04 ▼7.33
Posts /wp-admin/edit.php2,745 ▲392.98 ▲0.3166.94 ▲2.1192.77 ▼0.41
Add New Post /wp-admin/post-new.php1,687 ▼35119.03 ▼0.12377.71 ▲4.07125.71 ▲15.16
Media Library /wp-admin/upload.php1,814 ▲425.37 ▲0.37134.72 ▼22.18112.66 ▼6.39
Experiments /wp-admin/admin.php?page=maxab-experiment1,1252.3750.8675.20
FAQ /wp-admin/admin.php?page=maxab-faq1,2502.4950.7478.87

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
These items require your attention
  • This plugin does not fully uninstall, leaving 1 table in the database
    • wp_maxab_experiments

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Please fix the following server-side errors
    • > GET request to /wp-admin/admin.php?page=maxab-experiment
    • > Notice in wp-content/plugins/maxab/includes/experiment-controller.php+2
    Undefined index: action

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
  • 18× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Warning
      Use of undefined constant MAXAB_PLUGIN_URL - assumed 'MAXAB_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/maxab/includes/faq.php on line 7
    • > PHP Notice
      Undefined index: page_threshold in wp-content/plugins/maxab/includes/experiment-edit.php on line 9
    • > PHP Notice
      Undefined index: id in wp-content/plugins/maxab/includes/experiment-edit.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_row() on null in wp-content/plugins/maxab/includes/experiment-details.php:3
    • > PHP Notice
      Undefined index: action in wp-content/plugins/maxab/includes/experiment-controller.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function bloginfo() in wp-content/plugins/maxab/includes/faq.php:12
    • > PHP Notice
      Undefined index: end_criteria in wp-content/plugins/maxab/includes/experiment-edit.php on line 7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function bloginfo() in wp-content/plugins/maxab/includes/settings.php:12
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_results() on null in wp-content/plugins/maxab/includes/experiment-list.php:3
    • > PHP Warning
      Use of undefined constant MAXAB_PLUGIN_URL - assumed 'MAXAB_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/maxab/includes/settings.php on line 7

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There are user-side issues you should fix
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=maxab-faq
    • > Javascript (severe) in unknown
    /wp-content/plugins/maxab/js/jquery.simplemodal.js?ver=5.8.1 7:32 Uncaught TypeError: Cannot read properties of undefined (reading 'msie')

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Please fix the following attributes:
  • Screenshots: Please add images for these screenshots: #1 (You can see all the important metrics for an experiment by viewing its details.), #2 (Creating a new experiment is quick and easy.), #3 (The Experiments tab lists all of the split test experiments you've created.)
You can take inspiration from this readme.txt

maxab/maxab.php 92% from 13 tests

Analyzing the main PHP file in "MaxA/B" version 2.2.2
You should first fix the following items:
  • Description: Please don't use more than 140 characters for the plugin description (currently 283 characters long)

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
There were no executable files found in this plugin3,412 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
PHP11234581,579
JavaScript32043021,439
CSS100394

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.41
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%
Functions82
▷ Named functions82100.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants7100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 1 test

Image compression Passed 1 test

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
7 PNG files occupy 0.20MB with 0.10MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png69.07KB26.33KB▼ 61.88%
images/x.png1.04KB1.25KB0.00%
screenshot-1.png99.53KB36.05KB▼ 63.78%
images/max-foundry-logo.png10.10KB5.19KB▼ 48.63%
images/red-minus.png3.50KB0.91KB▼ 74.08%