68% explara-membership

Code Review | Explara Membership

WordPress plugin Explara Membership scored68%from 54 tests.

About plugin

  • Plugin page: explara-membership
  • Plugin version: 0.0.7
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.3
  • WordPress version: 6.3.1
  • First release: May 24, 2018
  • Latest release: Dec 5, 2019
  • Number of updates: 11
  • Update frequency: every 50.9 days
  • Top authors: explara2017 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /849 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.49MB] [CPU: ▼0.59ms] Passed 4 tests

An overview of server-side resources used by Explara Membership
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.95 ▲0.4845.22 ▲5.73
Dashboard /wp-admin3.87 ▲0.5260.32 ▼4.41
Posts /wp-admin/edit.php3.93 ▲0.5760.11 ▲6.57
Add New Post /wp-admin/post-new.php6.39 ▲0.5092.48 ▼9.96
Media Library /wp-admin/upload.php3.71 ▲0.4841.38 ▲6.26
Settings /wp-admin/admin.php?page=explara-membership-settings3.7243.11
Membership /wp-admin/admin.php?page=explara-membership3.7144.44

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 118 new files
Database: 2 new tables, 11 new options
New tables
wp_explara_members
wp_explara_groups
New WordPress options
widget_recent-comments
explara_membership_account_page
db_upgraded
explara_membership_payment_page
widget_recent-posts
explara_membership_version
explara_membership_page
can_compress_scripts
explara_membership_portal_page
widget_theysaidso_widget
...

Browser metrics Passed 4 tests

An overview of browser requirements for Explara Membership
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,128 ▲36716.78 ▲2.4320.55 ▲18.6943.77 ▲3.52
Dashboard /wp-admin2,368 ▲1916.13 ▲0.48122.72 ▲30.1744.55 ▼2.95
Posts /wp-admin/edit.php2,297 ▲1943.34 ▲1.3146.38 ▲4.1137.00 ▼0.55
Add New Post /wp-admin/post-new.php1,557 ▲3123.64 ▲0.36637.63 ▼51.6437.74 ▼18.29
Media Library /wp-admin/upload.php1,433 ▲334.15 ▼0.0384.88 ▼26.2752.87 ▲2.94
Settings /wp-admin/admin.php?page=explara-membership-settings1,3013.1439.6435.91
Membership /wp-admin/admin.php?page=explara-membership1,2583.0239.3628.25

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 had uncaught errors
    • > Deprecated in wp-content/plugins/explara-membership/includes/install/explara-membership-install.php+25
    Non-static method ExplaraMembership_Install::deleteOptionEntries() should not be called statically
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 50% 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 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 22× PHP files output non-empty strings when accessed directly via GET requests (only 10 are shown):
    • > /wp-content/plugins/explara-membership/pages/member/groups/group-renew.php
    • > /wp-content/plugins/explara-membership/pages/member/groups/group-close.php
    • > /wp-content/plugins/explara-membership/pages/member/groups/single/bkmodals.php
    • > /wp-content/plugins/explara-membership/pages/member/groups/includes/checkout-pricing.php
    • > /wp-content/plugins/explara-membership/pages/member/groups/includes/checkout-o-steps.php
    • > /wp-content/plugins/explara-membership/pages/member/account/forgotpassword.php
    • > /wp-content/plugins/explara-membership/pages/member/groups/single/discussion.php
    • > /wp-content/plugins/explara-membership/pages/member/groups/single/members.php
    • > /wp-content/plugins/explara-membership/pages/member/groups/single/media.php
    • > /wp-content/plugins/explara-membership/pages/member/groups/includes/checkout-c-steps.php
  • 140× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Notice
      Undefined variable: group in wp-content/plugins/explara-membership/pages/member/groups/includes/checkout-o-steps.php on line 100
    • > PHP Warning
      count(): Parameter must be an array or an object that implements Countable in wp-content/plugins/explara-membership/pages/member/groups/single/home.php on line 62
    • > PHP Notice
      Undefined variable: currency in wp-content/plugins/explara-membership/pages/member/groups/includes/checkout-o-steps.php on line 45
    • > PHP Notice
      Trying to get property 'name' of non-object in wp-content/plugins/explara-membership/pages/member/groups/group-renew.php on line 16
    • > PHP Notice
      Undefined variable: currency in wp-content/plugins/explara-membership/pages/member/groups/includes/checkout-c-steps.php on line 135
    • > PHP Notice
      Undefined variable: currency in wp-content/plugins/explara-membership/pages/member/groups/includes/checkout-o-steps.php on line 134
    • > PHP Notice
      Undefined variable: group in wp-content/plugins/explara-membership/pages/member/groups/includes/checkout-top.php on line 5
    • > PHP Notice
      Trying to get property 'plans' of non-object in wp-content/plugins/explara-membership/pages/member/groups/includes/checkout-c-steps.php on line 53
    • > PHP Notice
      Undefined variable: sub_total in wp-content/plugins/explara-membership/pages/member/groups/includes/checkout-c-steps.php on line 121
    • > PHP Notice
      Trying to get property 'details' of non-object in wp-content/plugins/explara-membership/pages/member/groups/single/home.php on line 95

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 Passed 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
2 plugin tags: group, membership

explara-membership/explara-membership.php Passed 13 tests

The main PHP file in "Explara Membership" ver. 0.0.7 adds more information about the plugin and also serves as the entry point for this plugin
70 characters long description:
Plugin enables user to create and manage group(s) and grow membership.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin58,176 lines of code in 106 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript1710,0673,68730,591
CSS23,36531811,592
Sass211,121547,901
PHP591,118924,836
SVG74373,256

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity12.53
▷ Minimum class complexity1.00
▷ Maximum class complexity68.00
Average method complexity2.48
▷ Minimum method complexity1.00
▷ Maximum method complexity29.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes19
▷ Abstract classes00.00%
▷ Concrete classes19100.00%
▷ Final classes00.00%
Methods148
▷ Static methods11678.38%
▷ Public methods12383.11%
▷ Protected methods00.00%
▷ Private methods2516.89%
Functions4
▷ Named functions375.00%
▷ Anonymous functions125.00%
Constants7
▷ Global constants7100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
public/img/default-skin.png0.53KB0.72KB0.00%