77% crm-memberships

Code Review | CRM Memberships

WordPress plugin CRM Memberships scored 77% from 54 tests.

About plugin

  • Plugin page: crm-memberships
  • Plugin version: 1.6
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-5.6
  • WordPress version: 5.9.2
  • First release: Jan 27, 2021
  • Latest release: Aug 2, 2021
  • Number of updates: 27
  • Update frequency: every 7.0 days
  • Top authors: dripadmin (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 995 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

Server metrics [RAM: ▲0.13MB] [CPU: ▼308.70ms] Passed 4 tests

A check of server-side resources used by CRM Memberships
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.65 ▲0.1457.45 ▲7.43
Dashboard /wp-admin3.54 ▲0.1332.21 ▼1.93
Posts /wp-admin/edit.php3.74 ▲0.1037.72 ▼9.64
Add New Post /wp-admin/post-new.php7.33 ▲0.3688.53 ▼1,219.06
Media Library /wp-admin/upload.php3.43 ▲0.1422.37 ▼4.17
Access Tags /wp-admin/admin.php?page=add-new-tag3.4425.38
Subscribers /wp-admin/admin.php?page=subscribers3.5336.27
Settings /wp-admin/admin.php?page=ntzcrm-settings3.4927.86
Publication Wizard /wp-admin/admin.php?page=add-publication-wizard3.4625.78
Publications /wp-admin/admin.php?page=publications3.4327.99
Getting Started /wp-admin/admin.php?page=getting-started3.3923.54

Server storage [IO: ▲1.17MB] [DB: ▲0.01MB] Passed 3 tests

Filesystem and database footprint
No storage issues were detected
Filesystem: 104 new files
Database: 6 new tables, no new options
New tables
wp_ntzcrm_user_activites
wp_ntzcrm_post_tags
wp_ntzcrm_user_logs
wp_ntzcrm_membership_tags
wp_ntzcrm_temp_tags
wp_ntzcrm_user_tags

Browser metrics Passed 4 tests

A check of browser resources used by CRM Memberships
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,894 ▲14016.47 ▲0.869.66 ▲3.962.46 ▼0.29
Dashboard /wp-admin2,906 ▲456.73 ▲0.56119.32 ▼16.41179.10 ▲21.27
Posts /wp-admin/edit.php2,704 ▲193.31 ▲0.0869.08 ▼0.35155.52 ▼39.90
Add New Post /wp-admin/post-new.php1,861 ▲15114.51 ▼6.23317.06 ▼134.50173.11 ▲6.21
Media Library /wp-admin/upload.php1,767 ▲646.06 ▲0.55128.03 ▼21.18191.20 ▲4.37
Access Tags /wp-admin/admin.php?page=add-new-tag1,4122.8655.66134.50
Subscribers /wp-admin/admin.php?page=subscribers1,3512.7355.05120.55
Settings /wp-admin/admin.php?page=ntzcrm-settings2,2529.19160.73205.09
Publication Wizard /wp-admin/admin.php?page=add-publication-wizard1,4834.7270.56162.54
Publications /wp-admin/admin.php?page=publications1,2932.7655.49119.02
Getting Started /wp-admin/admin.php?page=getting-started1,3772.7254.24134.57

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • The plugin did not uninstall successfully, leaving 6 tables in the database
    • wp_ntzcrm_post_tags
    • wp_ntzcrm_user_activites
    • wp_ntzcrm_user_logs
    • wp_ntzcrm_temp_tags
    • wp_ntzcrm_user_tags
    • wp_ntzcrm_membership_tags

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

SRP 0% 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
  • 4× PHP files output text when accessed directly:
    • > /wp-content/plugins/crm-memberships/includes/admin/admin-page.php
    • > /wp-content/plugins/crm-memberships/includes/admin/getting-started.php
    • > /wp-content/plugins/crm-memberships/includes/admin/ntzcrm-header.php
    • > /wp-content/plugins/crm-memberships/includes/admin/add-tag-form.php
  • 30× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/crm-memberships/includes/admin/publications.php on line 3
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/crm-memberships/includes/admin/publications.php on line 3
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/crm-memberships/includes/admin/subscribers.php on line 3
    • > PHP Warning
      Use of undefined constant NTZCRM_PLUGIN_URL - assumed 'NTZCRM_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/crm-memberships/includes/admin/ntzcrm-header.php on line 4
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/crm-memberships/includes/admin/subscribers.php on line 3
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/crm-memberships/includes/admin/publications.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/crm-memberships/includes/admin/usermeta.php:2
    • > PHP Warning
      Use of undefined constant NTZCRM_PLUGIN_URL - assumed 'NTZCRM_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/crm-memberships/includes/admin/getting-started.php on line 57
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_enqueue_style() in wp-content/plugins/crm-memberships/includes/admin/postmeta.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/crm-memberships/includes/view/login.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 80% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need your attention: You can look at the official readme.txt

crm-memberships/ntzcrm-memberships.php 62% from 13 tests

The primary PHP file in "CRM Memberships" version 1.6 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Description: Please don't use more than 140 characters for the plugin description (currently 252 characters long)
  • Domain Path: The domain path follows the same naming rules as the domain name, using only dashes and lowercase characters ("#")
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("crm-memberships.php" instead of "ntzcrm-memberships.php")
  • Domain Path: Please prefix the domain path with a forward slash character ("/#")
  • Text Domain: Please use dashes and lowercase characters for text domains

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Success! There were no dangerous files found in this plugin15,083 lines of code in 90 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript652,5908039,883
PHP204072043,434
CSS4109491,757
Markdown1709

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity64.83
▷ Minimum class complexity16.00
▷ Maximum class complexity147.00
Average method complexity5.12
▷ Minimum method complexity1.00
▷ Maximum method complexity32.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods93
▷ Static methods6266.67%
▷ Public methods9298.92%
▷ Protected methods00.00%
▷ Private methods11.08%
Functions48
▷ Named functions48100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
9 PNG files occupy 0.34MB with 0.20MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/crm-memberships-logo.png3.44KB1.95KB▼ 43.20%
images/pub-access-enabled.png10.00KB4.38KB▼ 56.24%
images/set-memb-login-menu.png169.34KB51.73KB▼ 69.45%
images/pub-access-disabled.png8.22KB3.34KB▼ 59.34%
images/get-start1.png40.03KB14.06KB▼ 64.88%