89% dashing-memberships

Code Review | Dashing Memberships

WordPress plugin Dashing Memberships scored89%from 54 tests.

About plugin

  • Plugin page: dashing-memberships
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.5
  • WordPress version: 6.3.1
  • First release: Apr 12, 2019
  • Latest release: Aug 14, 2020
  • Number of updates: 8
  • Update frequency: every 61.5 days
  • Top authors: handsomeapps (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /2,459 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
The plugin installed gracefully, with no errors

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

Analyzing server-side resources used by Dashing Memberships
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0342.08 ▲0.75
Dashboard /wp-admin3.34 ▲0.0347.79 ▼5.80
Posts /wp-admin/edit.php3.39 ▲0.0352.50 ▲1.57
Add New Post /wp-admin/post-new.php5.93 ▲0.0492.86 ▼10.22
Media Library /wp-admin/upload.php3.26 ▲0.0338.25 ▲2.34
Dashing Memberships /wp-admin/admin.php?page=learndash_lms_settings&page=ldmp_settings_screen3.2332.27
Start Here /wp-admin/admin.php?page=learndash_lms_settings&page=ldmp_welcome_page3.2737.80

Server storage [IO: ▲0.12MB] [DB: ▲0.07MB] Passed 3 tests

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

Browser metrics Passed 4 tests

Checking browser requirements for Dashing Memberships
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,816 ▲5514.16 ▼0.451.98 ▲0.2045.29 ▲3.87
Dashboard /wp-admin2,222 ▲425.60 ▼0.0987.08 ▼4.8142.12 ▼4.05
Posts /wp-admin/edit.php2,127 ▲272.01 ▲0.0344.12 ▲1.3641.41 ▲6.13
Add New Post /wp-admin/post-new.php6,294 ▲4,74918.90 ▼4.22906.19 ▲276.6757.53 ▲5.30
Media Library /wp-admin/upload.php1,421 ▲184.28 ▼0.04101.65 ▼4.6944.67 ▲0.02
Dashing Memberships /wp-admin/admin.php?page=learndash_lms_settings&page=ldmp_settings_screen8562.0524.1126.41
Start Here /wp-admin/admin.php?page=learndash_lms_settings&page=ldmp_welcome_page1,3369.22281.58111.47

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP Passed 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
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
There were no browser issues found

Optimizations

Plugin configuration 93% 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
5 plugin tags: learndash, member, memberships, elearning, membership

dashing-memberships/learndash-membership.php 85% from 13 tests

The entry point to "Dashing Memberships" version 1.1 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("dashing-memberships.php" instead of "learndash-membership.php")
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

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
Good job! No executable or dangerous file extensions detected847 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
PHP13196471681
CSS3108122
Markdown122036
JavaScript1008

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity8.38
▷ Minimum class complexity1.00
▷ Maximum class complexity16.00
Average method complexity2.53
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods39
▷ Static methods615.38%
▷ Public methods3692.31%
▷ Protected methods00.00%
▷ Private methods37.69%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants7100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There are no PNG files in this plugin