83% disable-wp-registration-page-spam

Code Review | Disable WP Registration Page Spam

WordPress plugin Disable WP Registration Page Spam scored83%from 54 tests.

About plugin

  • Plugin page: disable-wp-regist...
  • Plugin version: 1.0.1
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1.0-5.9
  • WordPress version: 6.3.1
  • First release: Jun 5, 2021
  • Latest release: Feb 18, 2022
  • Number of updates: 7
  • Update frequency: every 36.9 days
  • Top authors: subodhghulaxe (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

1,000+ active /6,279 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
Install script ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼8.18ms] Passed 4 tests

Analyzing server-side resources used by Disable WP Registration Page Spam
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0139.40 ▼3.39
Dashboard /wp-admin3.32 ▲0.0144.22 ▼16.68
Posts /wp-admin/edit.php3.37 ▲0.0145.83 ▼4.46
Add New Post /wp-admin/post-new.php5.90 ▲0.0179.84 ▼8.17
Media Library /wp-admin/upload.php3.24 ▲0.0134.87 ▼1.11

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
db_upgraded
widget_recent-posts
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Disable WP Registration Page Spam
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.18 ▼1.421.82 ▼0.1146.71 ▲2.81
Dashboard /wp-admin2,206 ▲154.84 ▼0.03108.89 ▼6.7137.86 ▼3.74
Posts /wp-admin/edit.php2,086 ▼32.00 ▼0.0140.54 ▲2.9635.30 ▲3.58
Add New Post /wp-admin/post-new.php1,514 ▼017.64 ▲0.06653.74 ▼51.1362.86 ▲7.14
Media Library /wp-admin/upload.php1,388 ▼04.18 ▼0.1197.37 ▲0.2842.79 ▼3.67

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
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
The following issues need your attention
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/disable-wp-registration-page-spam/DWRPS.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: Add an image for screenshot #1 (Removed 'register' link from login page)
Please take inspiration from this readme.txt

disable-wp-registration-page-spam/DWRPS.php 85% from 13 tests

This is the main PHP file of "Disable WP Registration Page Spam" version 1.0.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("disable-wp-registration-page-spam.php" instead of "DWRPS.php")
  • Domain Path: The domain path folder was not found ("/languages")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin23 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP261023

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions150.00%
▷ Anonymous functions150.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG images were found in this plugin