68% wishlist-member-api-testing

Code Review | Wishlist Member API Testing

WordPress plugin Wishlist Member API Testing scored 68% from 54 tests.

About plugin

  • Plugin page: wishlist-member-a...
  • Plugin version: 1.0.4
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.4
  • WordPress version: 6.3.1
  • First release: Jan 10, 2016
  • Latest release: Jan 27, 2016
  • Number of updates: 23
  • Update frequency: every 0.8 days
  • Top authors: happyplugins (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,167 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.91MB] [CPU: ▼34.02ms] Passed 4 tests

A check of server-side resources used by Wishlist Member API Testing
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0136.83 ▼6.59
Dashboard /wp-admin3.03 ▼0.2722.15 ▼22.50
Posts /wp-admin/edit.php3.03 ▼0.3226.38 ▼22.15
Add New Post /wp-admin/post-new.php3.03 ▼2.8523.63 ▼83.57
Media Library /wp-admin/upload.php3.03 ▼0.2022.85 ▼7.86
Wishlist Member API Testing /wp-admin/tools.php?page=wlm-api-testing3.0321.74

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Wishlist Member API Testing
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,920 ▲17414.05 ▼0.335.25 ▲3.3139.90 ▲0.39
Dashboard /wp-admin2,211 ▲265.81 ▲0.94100.28 ▲1.6239.00 ▼5.81
Posts /wp-admin/edit.php2,097 ▲112.04 ▲0.0238.71 ▼1.0434.87 ▲1.78
Add New Post /wp-admin/post-new.php1,615 ▲8023.77 ▲0.57657.49 ▼32.0157.16 ▼7.69
Media Library /wp-admin/upload.php1,399 ▲174.12 ▼0.09106.31 ▲8.7444.69 ▼1.97
Wishlist Member API Testing /wp-admin/tools.php?page=wlm-api-testing8241.7024.2727.84

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
Please fix the following items
  • Uninstall procedure validation failed for this plugin
    • > Notice in wp-content/plugins/wishlist-member-api-testing/includes/wlm-api-test.class.php+66
    Undefined index: wlmtest_level_id
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/tools.php?page=wlm-api-testing
    • > Notice in wp-content/plugins/wishlist-member-api-testing/includes/wlm-api-test.class.php+66
    Undefined index: wlmtest_level_id
    • > GET request to /wp-admin/tools.php?page=wlm-api-testing
    • > Notice in wp-content/plugins/wishlist-member-api-testing/includes/wlm-api-test.class.php+33
    Trying to get property 'id' of non-object

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
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wishlist-member-api-testing/includes/wlm-api-test.class.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
2 plugin tags: wishlist member, membership platforms

wishlist-member-api-testing/wlm-api-test.php 77% from 13 tests

Analyzing the main PHP file in "Wishlist Member API Testing" version 1.0.4
Please take the time to fix the following:
  • Requires at least: The required version number did not match the one declared in readme.txt ("4.4" instead of "4.0")
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("wishlist-member-api-testing.php" instead of "wlm-api-test.php")
  • Description: Keep the plugin description shorter than 140 characters (currently 160 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected400 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP38470391
JavaScript1506
CSS1103

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity28.00
▷ Minimum class complexity24.00
▷ Maximum class complexity32.00
Average method complexity3.84
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods19
▷ Static methods00.00%
▷ Public methods1684.21%
▷ Protected methods00.00%
▷ Private methods315.79%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
PNG images were not found in this plugin