94% member-authorisation-for-sheep-crm

Code Review | Member authorisation for Sheep CRM

WordPress plugin Member authorisation for Sheep CRM scored 94% from 54 tests.

About plugin

  • Plugin page: member-authorisat...
  • Plugin version: 1.1
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-5.4.1
  • WordPress version: 5.8.1
  • First release: Jun 8, 2018
  • Latest release: May 19, 2020
  • Number of updates: 9
  • Update frequency: every 79.1 days
  • Top authors: tallprojects (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 455 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.09MB] [CPU: ▼139.21ms] Passed 4 tests

Analyzing server-side resources used by Member authorisation for Sheep CRM
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.91 ▲0.1933.16 ▲10.12
Dashboard /wp-admin3.15 ▲0.0949.61 ▲3.31
Posts /wp-admin/edit.php3.26 ▲0.1450.40 ▲5.67
Add New Post /wp-admin/post-new.php5.50 ▲0.0696.62 ▼561.71
Media Library /wp-admin/upload.php3.09 ▲0.0838.21 ▼4.12
Sheep member authorisation /wp-admin/options-general.php?page=sheep-member-authorisation3.0633.12

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 10 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for Member authorisation for Sheep CRM
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,708 ▲11215.80 ▲0.319.35 ▲0.8252.75 ▲1.82
Dashboard /wp-admin2,974 ▲405.89 ▼0.29143.27 ▼21.08107.92 ▼18.61
Posts /wp-admin/edit.php2,744 ▲82.69 ▼0.0068.71 ▲8.3598.67 ▲4.74
Add New Post /wp-admin/post-new.php1,675 ▲9418.84 ▲2.23372.65 ▼30.43118.26 ▼5.52
Media Library /wp-admin/upload.php1,818 ▲115.01 ▼0.00153.23 ▼38.75122.82 ▼9.10
Sheep member authorisation /wp-admin/options-general.php?page=sheep-member-authorisation1,1622.0662.4192.42

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Uninstall script ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please take a closer look at the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/member-authorisation-for-sheep-crm/admin/templates/admin-settings.php:16

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 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
10 plugin tags: sheepcrm, members, sheep crm, sheep, membership...

member-authorisation-for-sheep-crm/sheep-member-authorisation.php 85% from 13 tests

The principal PHP file in "Member authorisation for Sheep CRM" v. 1.1 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("member-authorisation-for-sheep-crm.php" instead of "sheep-member-authorisation.php")
  • Description: The description should be shorter than 140 characters (currently 170 characters long)

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
There were no executable files found in this plugin407 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP8122239407

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity10.67
▷ Minimum class complexity6.00
▷ Maximum class complexity14.00
Average method complexity2.66
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes233.33%
▷ Concrete classes466.67%
▷ Final classes00.00%
Methods35
▷ Static methods3394.29%
▷ Public methods2571.43%
▷ Protected methods822.86%
▷ Private methods25.71%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants00.00%
▷ Class constants3100.00%
▷ Public constants3100.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
There were not PNG files found in your plugin