67% gym-studio-membership-management

Code Review | Gym Studio Membership Management

WordPress plugin Gym Studio Membership Management scored67%from 54 tests.

About plugin

  • Plugin page: gym-studio-member...
  • Plugin version: 1.0.9
  • PHP version: 7.4.16
  • WordPress compatibility: 4.2.4-6.1.1
  • WordPress version: 6.3.1
  • First release: Sep 21, 2015
  • Latest release: Feb 8, 2023
  • Number of updates: 86
  • Update frequency: every 31.4 days
  • Top authors: Fitsoft (100%)

Code review

54 tests

User reviews

15 reviews

Install metrics

100+ active /16,136 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▼0.25MB] [CPU: ▼15.15ms] Passed 4 tests

This is a short check of server-side resources used by Gym Studio Membership Management
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0236.59 ▼1.41
Dashboard /wp-admin3.33 ▲0.0342.98 ▼5.80
Posts /wp-admin/edit.php3.38 ▲0.0343.72 ▲1.21
Add New Post /wp-admin/post-new.php4.82 ▼1.0648.08 ▼51.83
Media Library /wp-admin/upload.php3.25 ▲0.0331.88 ▼1.56
Membership Management /wp-admin/options-general.php?page=my-setting-admin3.2231.55

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 23 new files
Database: 1 new table, 7 new options
New tables
wp_fitsoft
New WordPress options
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts
widget_recent-posts
db_upgraded
theysaidso_admin_options
fitsoft_membership_plugin_version

Browser metrics Passed 4 tests

Gym Studio Membership Management: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,044 ▲29814.45 ▲0.1217.97 ▲16.1836.47 ▼1.60
Dashboard /wp-admin2,244 ▲565.00 ▼0.91103.15 ▲2.3537.36 ▼7.95
Posts /wp-admin/edit.php2,132 ▲462.32 ▲0.2834.67 ▼1.0232.45 ▼1.70
Add New Post /wp-admin/post-new.php6,213 ▲4,69419.06 ▼4.02847.88 ▲180.7538.47 ▼26.84
Media Library /wp-admin/upload.php1,423 ▲384.50 ▲0.2997.24 ▼1.9741.77 ▼6.43
Membership Management /wp-admin/options-general.php?page=my-setting-admin8591.9829.7225.53

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 1 table in the database
    • wp_fitsoft
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • fitsoft_membership_plugin_version
    • can_compress_scripts

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)
Good news, no errors were detected

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
Please take a closer look at the following
  • 4× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/gym-studio-membership-management/membership-management-common.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/gym-studio-membership-management/membership-management-buttons.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/gym-studio-membership-management/membership-management.php:34
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/gym-studio-membership-management/membership-management-options.php:4

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
These are user-side errors you should fix
    • > GET request to /wp-admin/options-general.php?page=my-setting-admin
    • > Network (severe)
    var/www/wordpress/wp-content/plugins/gym-studio-membership-management//fitsoftsettingopt-plugin.js?ver=1.0.2 - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that require attention:
  • Tags: There are too many tags (13 tag instead of maximum 10)
The official readme.txt might help

gym-studio-membership-management/membership-management.php 77% from 13 tests

The principal PHP file in "Gym Studio Membership Management" v. 1.0.9 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 ("gym-studio-membership-management.php" instead of "membership-management.php")
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 346 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
Success! There were no dangerous files found in this plugin1,555 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP63561821,343
JavaScript54132212

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.56
Average class complexity82.00
▷ Minimum class complexity3.00
▷ Maximum class complexity161.00
Average method complexity6.06
▷ Minimum method complexity1.00
▷ Maximum method complexity51.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods32
▷ Static methods00.00%
▷ Public methods2371.88%
▷ Protected methods00.00%
▷ Private methods928.12%
Functions32
▷ Named functions32100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.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
11 PNG files occupy 0.24MB with 0.15MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
block/img/monthlycalendar.png58.83KB26.91KB▼ 54.27%
editorbtn/fsmemberlogin.png1.34KB0.51KB▼ 61.56%
images/accountbtn.png13.45KB4.22KB▼ 68.65%
block/img/login.png16.24KB6.66KB▼ 58.98%
images/cpbtn.png9.70KB2.78KB▼ 71.29%