84% disable-register

Code Review | Disable Register

WordPress plugin Disable Register scored84%from 54 tests.

About plugin

  • Plugin page: disable-register
  • Plugin version: 2.0.2
  • PHP compatiblity: 7.1+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.1-5.1.1
  • WordPress version: 6.3.1
  • First release: Jan 3, 2017
  • Latest release: Dec 18, 2019
  • Number of updates: 9
  • Update frequency: every 119.7 days
  • Top authors: wido (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /1,895 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.10MB] [CPU: ▲1.74ms] Passed 4 tests

A check of server-side resources used by Disable Register
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.1046.83 ▲3.04
Dashboard /wp-admin3.40 ▲0.1057.19 ▲8.85
Posts /wp-admin/edit.php3.51 ▲0.1652.49 ▼2.84
Add New Post /wp-admin/post-new.php5.98 ▲0.09102.63 ▲1.98
Media Library /wp-admin/upload.php3.32 ▲0.0940.52 ▲4.76

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 17 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

Disable Register: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,791 ▲514.38 ▲0.041.69 ▼0.2743.78 ▼0.69
Dashboard /wp-admin2,195 ▲155.64 ▼0.0490.51 ▼5.0342.34 ▲1.37
Posts /wp-admin/edit.php2,100 ▼01.98 ▼0.0137.25 ▲1.5333.20 ▼1.08
Add New Post /wp-admin/post-new.php1,528 ▲223.11 ▼0.52666.51 ▼28.6455.09 ▼7.74
Media Library /wp-admin/upload.php1,403 ▲34.20 ▼0.0096.27 ▼1.1743.84 ▼8.22

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 75% 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 50% from 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
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 Widoz\\DisableRegister\\plugin_dir_path() in wp-content/plugins/disable-register/disable-register.php:63

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (This screen shot description corresponds to screenshot-1.(png|jpg|jpeg|gif). Note that the screenshot is taken from), #2 (This is the second screen shot)
You can look at the official readme.txt

disable-register/disable-register.php Passed 13 tests

Analyzing the main PHP file in "Disable Register" version 2.0.2
16 characters long description:
Disable Register

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
Success! There were no dangerous files found in this plugin548 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
PHP12126341542
CSS1135
JSON1001

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity9.57
▷ Minimum class complexity1.00
▷ Maximum class complexity44.00
Average method complexity2.58
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods39
▷ Static methods37.69%
▷ Public methods3794.87%
▷ Protected methods12.56%
▷ Private methods12.56%
Functions7
▷ Named functions457.14%
▷ Anonymous functions342.86%
Constants3
▷ Global constants00.00%
▷ Class constants3100.00%
▷ Public constants3100.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 were not PNG files found in your plugin