84% wplms-woocommerce-membership-addon

Code Review | WPLMS WooCommerce Memberships

WordPress plugin WPLMS WooCommerce Memberships scored84%from 54 tests.

About plugin

  • Plugin page: wplms-woocommerce...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-5.0.3
  • WordPress version: 6.3.1
  • First release: Feb 10, 2019
  • Latest release: Feb 10, 2019
  • Number of updates: 3
  • Update frequency: every 540.0 days
  • Top authors: VibeThemes (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /1,203 total downloads

Benchmarks

Plugin footprint 83% 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: ▲0.01MB] [CPU: ▼4.94ms] Passed 4 tests

A check of server-side resources used by WPLMS WooCommerce Memberships
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0139.50 ▼5.56
Dashboard /wp-admin3.31 ▲0.0145.08 ▼0.69
Posts /wp-admin/edit.php3.36 ▲0.0147.73 ▼4.23
Add New Post /wp-admin/post-new.php5.89 ▲0.0188.87 ▼8.97
Media Library /wp-admin/upload.php3.23 ▲0.0033.48 ▼1.01

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

WPLMS WooCommerce Memberships: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.23 ▼1.031.84 ▼0.2539.71 ▼4.56
Dashboard /wp-admin2,209 ▲244.88 ▼0.99108.35 ▲7.5841.54 ▼0.04
Posts /wp-admin/edit.php2,089 ▼02.01 ▼0.0439.35 ▼5.4837.12 ▲2.11
Add New Post /wp-admin/post-new.php1,533 ▼123.27 ▲0.05664.00 ▼2.5247.78 ▼14.43
Media Library /wp-admin/upload.php1,385 ▼04.19 ▼0.0299.91 ▲4.0543.50 ▼0.19

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 75% 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)
Everything seems fine, however this is by no means 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
Almost there! Just fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/wplms-woocommerce-membership-addon/wplms-woocommerce-memberships.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/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
4 plugin tags: wplms, ga, google analytics, wplms ga

wplms-woocommerce-membership-addon/wplms-woocommerce-memberships.php 92% from 13 tests

The principal PHP file in "WPLMS WooCommerce Memberships" v. 1.0 is loaded by WordPress automatically on each request
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("wplms-woocommerce-membership-addon.php" instead of "wplms-woocommerce-memberships.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
There were no executable files found in this plugin508 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP25227293
JavaScript16845186
CSS1158729

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.59
Average class complexity58.00
▷ Minimum class complexity58.00
▷ Maximum class complexity58.00
Average method complexity5.07
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods14
▷ Static methods17.14%
▷ Public methods14100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.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
No PNG images were found in this plugin