78% my-wp-ab-testing

Code Review | My WP A/B Testing

WordPress plugin My WP A/B Testing scored78%from 54 tests.

About plugin

  • Plugin page: my-wp-ab-testing
  • Plugin version: 0.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3-6.1
  • WordPress version: 6.3.1
  • First release: Dec 23, 2020
  • Latest release: Oct 26, 2022
  • Number of updates: 8
  • Update frequency: every 83.9 days
  • Top authors: audrasjb (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

60+ active /1,966 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

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

Analyzing server-side resources used by My WP A/B Testing
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0340.18 ▼3.55
Dashboard /wp-admin3.33 ▲0.0352.46 ▼2.63
Posts /wp-admin/edit.php3.38 ▲0.0347.18 ▼10.53
Add New Post /wp-admin/post-new.php5.92 ▲0.0388.67 ▼19.68
Media Library /wp-admin/upload.php3.26 ▲0.0346.08 ▲9.83
Add New /wp-admin/post-new.php?post_type=abtesting3.3045.93
All campaigns /wp-admin/edit.php?post_type=abtesting3.3038.28

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 16 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

My WP A/B Testing: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,845 ▲8413.30 ▼1.372.00 ▲0.2244.48 ▲1.36
Dashboard /wp-admin2,248 ▲426.01 ▲0.1198.72 ▼20.6937.72 ▼10.67
Posts /wp-admin/edit.php2,127 ▲272.06 ▲0.0433.36 ▼3.8735.08 ▼2.41
Add New Post /wp-admin/post-new.php1,717 ▲18323.01 ▼0.13667.60 ▲75.6836.30 ▼25.37
Media Library /wp-admin/upload.php1,430 ▲304.24 ▲0.0199.10 ▼7.5742.23 ▼6.90
Add New /wp-admin/post-new.php?post_type=abtesting1,4653.2756.4159.53
All campaigns /wp-admin/edit.php?post_type=abtesting1,0821.9331.3228.00

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/my-wp-ab-testing/my-wp-abtesting.php
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/my-wp-ab-testing/gut.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
There were no plugin tags found

my-wp-ab-testing/my-wp-abtesting.php 92% from 13 tests

The primary PHP file in "My WP A/B Testing" version 0.1 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("my-wp-ab-testing.php" instead of "my-wp-abtesting.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Success! There were no dangerous files found in this plugin12,630 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript62,4052,29411,583
PHP37553733
JSX2260236
CSS110047
JSON10031

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.36
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%
Functions14
▷ Named functions1392.86%
▷ Anonymous functions17.14%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
There are no PNG files in this plugin