68% wp-test-monkey

Code Review | WP Test Monkey

WordPress plugin WP Test Monkey scored68%from 54 tests.

About plugin

  • Plugin page: wp-test-monkey
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.4
  • WordPress version: 6.3.1
  • First release: Sep 19, 2012
  • Latest release: Sep 29, 2012
  • Number of updates: 16
  • Update frequency: every 0.6 days
  • Top authors: murrayjgray (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,904 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

Server metrics [RAM: ▼1.91MB] [CPU: ▼52.31ms] Passed 4 tests

A check of server-side resources used by WP Test Monkey
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.07 ▼1.394.09 ▼37.24
Dashboard /wp-admin2.09 ▼1.215.60 ▼41.10
Posts /wp-admin/edit.php2.09 ▼1.267.36 ▼43.04
Add New Post /wp-admin/post-new.php2.09 ▼3.795.60 ▼87.85
Media Library /wp-admin/upload.php2.09 ▼1.136.00 ▼28.64

Server storage [IO: ▲0.20MB] [DB: ▲0.01MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 76 new files
Database: 7 new tables, 7 new options
New tables
wp_WPTestMonkey_variations
wp_WPTestMonkey_ip_filters
wp_WPTestMonkey_variation_views
wp_WPTestMonkey_tests
wp_WPTestMonkey_combinations
wp_WPTestMonkey_elements
wp_WPTestMonkey_test_elements
New WordPress options
db_upgraded
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
WPTestMonkey_current_migration
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for WP Test Monkey
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,894 ▲13713.62 ▼0.674.85 ▲2.8540.88 ▼9.40
Dashboard /wp-admin2,218 ▲275.82 ▼0.08100.30 ▼0.7374.77 ▲29.89
Posts /wp-admin/edit.php2,110 ▲212.04 ▼0.0038.34 ▼0.6833.90 ▼3.39
Add New Post /wp-admin/post-new.php1,531 ▼222.03 ▼1.15760.24 ▲96.3169.91 ▲12.82
Media Library /wp-admin/upload.php1,403 ▲154.12 ▼0.1093.95 ▼3.7981.73 ▲40.77

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • Uninstall procedure had uncaught errors
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the jquery handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

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
  • 10× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/wp-test-monkey/admin/help.php
    • > /wp-content/plugins/wp-test-monkey/admin/debug.php
    • > /wp-content/plugins/wp-test-monkey/admin/register.php
    • > /wp-content/plugins/wp-test-monkey/admin/upgrade.php
    • > /wp-content/plugins/wp-test-monkey/admin/tabs.php
    • > /wp-content/plugins/wp-test-monkey/admin/create_project.php
    • > /wp-content/plugins/wp-test-monkey/admin/create_experiment.php
    • > /wp-content/plugins/wp-test-monkey/admin/side.php
    • > /wp-content/plugins/wp-test-monkey/admin/add_goal.php
    • > /wp-content/plugins/wp-test-monkey/admin/add_project_goal.php
  • 142× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Notice
      Undefined variable: wpdb in wp-content/plugins/wp-test-monkey/admin/get_tracking_code.php on line 5
    • > PHP Notice
      Undefined index: id in wp-content/plugins/wp-test-monkey/admin/delete_variation.php on line 4
    • > PHP Notice
      Undefined index: id in wp-content/plugins/wp-test-monkey/admin/edit_project_goal.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_row() on null in wp-content/plugins/wp-test-monkey/admin/edit_project.php:5
    • > PHP Warning
      Use of undefined constant WP_PLUGIN_URL - assumed 'WP_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/wp-test-monkey/WPTMMessages.php on line 22
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/wp-test-monkey/admin/create_element.php on line 117
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_is_post_revision() in wp-content/plugins/wp-test-monkey/admin/track_shortrcode_on_save.php:3
    • > PHP Warning
      Use of undefined constant WP_PLUGIN_URL - assumed 'WP_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/wp-test-monkey/WPTMMessages.php on line 22
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_row() on null in wp-content/plugins/wp-test-monkey/admin/edit_project_goal.php:5
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_row() on null in wp-content/plugins/wp-test-monkey/admin/delete_project_goal.php:5

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

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
6 plugin tags: multivariate testing, multivariate, test, split testing, split...

wp-test-monkey/WPTMSplitTest.php 92% from 13 tests

The primary PHP file in "WP Test Monkey" version 1.0 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 ("wp-test-monkey.php" instead of "WPTMSplitTest.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 plugin3,275 lines of code in 63 files:
LanguageFilesBlank linesComment linesLines of code
PHP592901323,186
JavaScript34451
CSS10138

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.37
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%
Functions30
▷ Named functions30100.00%
▷ Anonymous functions00.00%
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
3 compressed PNG files occupy 0.00MB
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/test.png0.76KB0.78KB0.00%
images/wptm.png1.75KB1.03KB▼ 41.24%
images/help.png0.54KB0.52KB▼ 3.44%