74% flexible-ab-results

Code Review | Flexible AB Results

WordPress plugin Flexible AB Results scored74%from 54 tests.

About plugin

  • Plugin page: flexible-ab-results
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-4.1
  • WordPress version: 6.3.1
  • First release: Jan 3, 2015
  • Latest release: Jan 3, 2015
  • Number of updates: 4
  • Update frequency: every 0.3 days
  • Top authors: easydevelopment (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,194 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.15MB] [CPU: ▼1.76ms] Passed 4 tests

Server-side resources used by Flexible AB Results
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.59 ▲0.1342.50 ▼0.51
Dashboard /wp-admin3.52 ▲0.2147.06 ▼1.82
Posts /wp-admin/edit.php3.55 ▲0.1945.78 ▼6.16
Add New Post /wp-admin/post-new.php6.04 ▲0.1597.34 ▲2.27
Media Library /wp-admin/upload.php3.38 ▲0.1533.42 ▲1.45

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 33 new files
Database: 3 new tables, 7 new options
New tables
wp_flexible_ab_results_campaign_option
wp_flexible_ab_results_campaign
wp_flexible_ab_results_campaign_option_display
New WordPress options
flexible_ab_results_database_version
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for Flexible AB Results
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲6914.60 ▲0.411.65 ▼0.0641.01 ▲0.41
Dashboard /wp-admin2,224 ▲324.93 ▲0.0599.65 ▼5.0777.38 ▲41.85
Posts /wp-admin/edit.php2,104 ▲152.01 ▲0.0236.15 ▼0.4732.60 ▲2.47
Add New Post /wp-admin/post-new.php1,536 ▼223.17 ▼0.02669.84 ▼7.3553.00 ▼0.75
Media Library /wp-admin/upload.php1,400 ▲94.23 ▲0.01102.24 ▲1.2846.44 ▼1.11

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
  • Zombie tables were found after uninstall: 2 tables
    • wp_flexible_ab_results_campaign_option_display
    • wp_flexible_ab_results_campaign_option
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • flexible_ab_results_database_version
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
  • 15× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'FlexibleABResultsController' not found in wp-content/plugins/flexible-ab-results/views/_header.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'FlexibleABResultsAbstractDatabase' not found in wp-content/plugins/flexible-ab-results/entity/campaignOptionDisplay.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'FlexibleABResultsController' not found in wp-content/plugins/flexible-ab-results/views/campaign_iframe_view.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'FlexibleABResultsAbstractDatabase' not found in wp-content/plugins/flexible-ab-results/entity/campaign.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/flexible-ab-results/flexible-ab-results.php:69
    • > PHP Fatal error
      Uncaught Error: Class 'FlexibleABResultsController' not found in wp-content/plugins/flexible-ab-results/views/admin_campaign_add.php:1
    • > PHP Notice
      Undefined variable: campaignInformation in wp-content/plugins/flexible-ab-results/views/campaign_iframe_view.php on line 3
    • > PHP Notice
      Trying to get property 'name' of non-object in wp-content/plugins/flexible-ab-results/views/campaign_iframe_view.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/flexible-ab-results/views/help.php:1
    • > PHP Fatal error
      Uncaught Error: Class 'FlexibleABResultsController' not found in wp-content/plugins/flexible-ab-results/views/admin_campaign_edit.php:1

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need to be fixed:
  • Tags: Please reduce the number of tags, currently 11 tag instead of maximum 10
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === flexible-ab-results === )
You can take inspiration from this readme.txt

flexible-ab-results/flexible-ab-results.php Passed 13 tests

The main PHP script in "Flexible AB Results" version 1.0.0 is automatically included on every request by WordPress
76 characters long description:
Flexible AB Results is an easy way to manage AB Testing on various websites.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected7,633 lines of code in 25 files:
LanguageFilesBlank linesComment linesLines of code
CSS3571106,304
PHP17252691,058
SVG100229
SQL12027
Markdown13011
JavaScript2064

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity12.12
▷ Minimum class complexity4.00
▷ Maximum class complexity18.00
Average method complexity2.27
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes112.50%
▷ Concrete classes787.50%
▷ Final classes00.00%
Methods71
▷ Static methods11.41%
▷ Public methods5476.06%
▷ Protected methods00.00%
▷ Private methods1723.94%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants00.00%
▷ Class constants3100.00%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
2 PNG files occupy 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/icon.png3.15KB0.41KB▼ 87.03%
assets/logo.png5.46KB2.09KB▼ 61.64%