10% ab-press-optimizer-lite

Code Review | AB Press Optimizer

WordPress plugin AB Press Optimizer scored 10% from 54 tests.

About plugin

  • Plugin page: ab-press-optimize...
  • Plugin version: 1.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4.2-4.1
  • WordPress version: 5.9.2
  • First release: Aug 20, 2013
  • Latest release: Jan 5, 2015
  • Number of updates: 13
  • Update frequency: every 38.7 days
  • Top authors: IvanLopez (92.31%)Mammothology (15.38%)

Code review

54 tests

User reviews

3 reviews

Install metrics

10+ active / 3,084 total downloads

Benchmarks

Plugin footprint 75% 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
  • The plugin cannot be installed
    • > Deprecated in wp-content/plugins/ab-press-optimizer-lite/includes/functions.php+667
    Unparenthesized `a ? b : c ? d : e` is deprecated. Use either `(a ? b : c) ? d : e` or `a ? b : (c ? d : e)`

Server metrics [RAM: ▲0.03MB] [CPU: ▼287.86ms] Passed 4 tests

An overview of server-side resources used by AB Press Optimizer
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0355.96 ▲5.19
Dashboard /wp-admin3.47 ▲0.0636.73 ▲3.78
Posts /wp-admin/edit.php3.69 ▲0.0548.37 ▲10.26
Add New Post /wp-admin/post-new.php6.93 ▼0.0493.68 ▼1,162.83
Media Library /wp-admin/upload.php3.35 ▲0.0625.16 ▲2.43
Detail /wp-admin/admin.php?page=abpo-details3.2220.38
Experiments /wp-admin/admin.php?page=abpo-experiment3.3025.40
Delete /wp-admin/admin.php?page=abpo-delete3.3023.99
Getting Started /wp-admin/admin.php?page=abpo-gettingStarted3.4024.96
New /wp-admin/admin.php?page=abpo-new3.3725.15
Edit /wp-admin/admin.php?page=abpo-edit3.2222.01

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 54 new files
Database: 2 new tables, 2 new options
New tables
wp_ab_press_optimizer_lite_experiment
wp_ab_press_optimizer_lite_variations
New WordPress options
ab_press_hide_pointer
ab_press_optimizer_version

Browser metrics Passed 4 tests

Checking browser requirements for AB Press Optimizer
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /4,056 ▲30217.05 ▲1.2710.51 ▲4.362.87 ▼0.02
Dashboard /wp-admin2,974 ▲1136.93 ▲0.71116.51 ▼15.12164.84 ▼0.31
Posts /wp-admin/edit.php2,774 ▲833.38 ▲0.1470.52 ▲6.12155.94 ▲13.13
Add New Post /wp-admin/post-new.php1,723 ▲6216.47 ▲0.03390.15 ▼20.91190.45 ▲36.41
Media Library /wp-admin/upload.php1,787 ▲926.05 ▲0.53129.45 ▼12.35200.61 ▲5.48
Detail /wp-admin/admin.php?page=abpo-details1,2272.9656.02117.52
Experiments /wp-admin/admin.php?page=abpo-experiment1,2263.1358.49117.51
Delete /wp-admin/admin.php?page=abpo-delete1,0592.9355.6998.54
Getting Started /wp-admin/admin.php?page=abpo-gettingStarted1,9133.0060.05118.40
New /wp-admin/admin.php?page=abpo-new1,3963.0259.46116.99
Edit /wp-admin/admin.php?page=abpo-edit1,2323.0756.23120.09

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Uninstaller ran successfully

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These server-side errors were triggered
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=abpo-edit
    • > Notice in wp-content/plugins/ab-press-optimizer-lite/class-ab-press-optimizer.php+460
    Undefined index: eid
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=abpo-edit
    • > User deprecated in wp-includes/functions.php+5326
    screen_icon is deprecated since version 3.8.0 with no alternative available.
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=abpo-edit
    • > User deprecated in wp-includes/functions.php+5326
    get_screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/admin.php?page=abpo-delete
    • > Warning in wp-content/plugins/ab-press-optimizer-lite/class-ab-press-optimizer.php+479
    Cannot modify header information - headers already sent by (output started at wp-includes/script-loader.php:2036)

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please take a closer look at the following
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/ab-press-optimizer-lite/views/shortcode_popup.php
  • 6× 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-press-optimizer-lite/includes/functions.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/ab-press-optimizer-lite/views/experiment.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function ab_press_getExperiment() in wp-content/plugins/ab-press-optimizer-lite/views/details.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/ab-press-optimizer-lite/views/gettingStarted.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/ab-press-optimizer-lite/views/new.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function ab_press_getExperiment() in wp-content/plugins/ab-press-optimizer-lite/views/edit.php:15

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=abpo-gettingStarted
    • > Network (severe)
    wp-content/plugins/ab-press-optimizer-lite/assets/editorbutton.png - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that require attention:
  • Screenshots: Please add images for these screenshots: #1 (**New Experiment** - Quickly setup your experiment by filling in a few simple text inputs. We have taken out all the guest work and made the interface straight forward. With A/B Testing integrated into WordPress you have complete access and control of your data.), #2 (**Embedding Experiment** - No need to remember how to embed an experiment simply use our intuitive Shortcode interface to select and embed and experiment), #3 (**Advanced Embedding** - If you need more flexibility simply use our embedding PHP function to integrate and experiment directly into your theme.), #4 (**Real time metrics** - Instantly watch and compare your variation to choose your best option. Efficiently monitor visitors, conversions and conversion rates. Get your strongest variations with only a sample size of 30 visitors per variation.)
You can take inspiration from this readme.txt

ab-press-optimizer-lite/ab-press-optimizer.php 77% from 13 tests

The principal PHP file in "AB Press Optimizer" v. 1.1.1 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 193 characters long)
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("ab-press-optimizer-lite.php" instead of "ab-press-optimizer.php")
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected3,775 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
PHP114294241,928
CSS268501,291
JavaScript689176556

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity32.00
▷ Minimum class complexity32.00
▷ Maximum class complexity32.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods31
▷ Static methods412.90%
▷ Public methods2683.87%
▷ Protected methods00.00%
▷ Private methods516.13%
Functions31
▷ Named functions31100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
21 PNG files occupy 0.16MB with 0.04MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/ab-logo.png2.92KB1.34KB▼ 54.05%
assets/ui-bg_highlight-soft_75_cccccc_1x100.png0.10KB0.17KB0.00%
assets/ui-bg_glass_55_fbf9ee_1x400.png0.12KB0.14KB0.00%
assets/banner-772x250.png36.20KB14.52KB▼ 59.90%
assets/ui-icons_454545_256x240.png4.27KB4.11KB▼ 3.78%