84% beta-flags

Code Review | Beta Flags ... now with A/B Testing!

WordPress plugin Beta Flags ... now with A/B Testing! scored84%from 54 tests.

About plugin

  • Plugin page: beta-flags
  • Plugin version: 1.3.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.9.8
  • WordPress version: 6.3.1
  • First release: Oct 17, 2018
  • Latest release: Nov 2, 2018
  • Number of updates: 13
  • Update frequency: every 1.2 days
  • Top authors: cmjaimet (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /561 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.04MB] [CPU: ▼9.63ms] Passed 4 tests

Server-side resources used by Beta Flags ... now with A/B Testing!
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0237.98 ▼3.62
Dashboard /wp-admin3.37 ▲0.0244.93 ▼13.47
Posts /wp-admin/edit.php3.48 ▲0.1245.33 ▲0.34
Add New Post /wp-admin/post-new.php5.95 ▲0.0678.83 ▼15.70
Media Library /wp-admin/upload.php3.29 ▲0.0631.37 ▼5.73
Beta Flags /wp-admin/tools.php?page=beta-flags3.2528.68

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Beta Flags ... now with A/B Testing!
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲4714.63 ▲0.231.74 ▼0.0944.79 ▲0.29
Dashboard /wp-admin2,196 ▲195.55 ▼0.1383.92 ▼7.3538.89 ▼0.04
Posts /wp-admin/edit.php2,107 ▲252.00 ▼0.0137.38 ▲2.6133.14 ▼4.59
Add New Post /wp-admin/post-new.php1,529 ▲123.18 ▲0.03664.47 ▲3.4258.39 ▼4.05
Media Library /wp-admin/upload.php1,407 ▲44.21 ▲0.0196.78 ▼0.2942.48 ▼1.75
Beta Flags /wp-admin/tools.php?page=beta-flags8972.0324.1225.47

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/tools.php?page=beta-flags
    • > Notice in wp-content/plugins/beta-flags/classes/class-admin.php+41
    Trying to get property 'ab_test_on' of non-object

SRP Passed 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
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

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
4 plugin tags: developers, ab testing, beta flags, feature flags

beta-flags/beta-flags.php 92% from 13 tests

"Beta Flags ... now with A/B Testing!" version 1.3.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Domain Path: The domain path points to a folder that does not exist ("/languages")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Good job! No executable or dangerous file extensions detected325 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP32594235
Markdown126071
JSON10019

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity18.50
▷ Minimum class complexity11.00
▷ Maximum class complexity26.00
Average method complexity3.19
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods16
▷ Static methods00.00%
▷ Public methods16100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.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
No PNG files were detected