84% ban-subdomain-emails

Code Review | Ban Subdomain Emails

WordPress plugin Ban Subdomain Emails scored84%from 54 tests.

About plugin

  • Plugin page: ban-subdomain-emails
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.5
  • WordPress version: 6.3.1
  • First release: Apr 27, 2016
  • Latest release: Apr 27, 2016
  • Number of updates: 3
  • Update frequency: every 4.3 days
  • Top authors: jamiechong (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,175 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼6.94ms] Passed 4 tests

An overview of server-side resources used by Ban Subdomain Emails
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0241.13 ▼9.49
Dashboard /wp-admin3.33 ▲0.0248.21 ▼2.55
Posts /wp-admin/edit.php3.38 ▲0.0248.22 ▼4.70
Add New Post /wp-admin/post-new.php5.91 ▲0.0298.72 ▼11.00
Media Library /wp-admin/upload.php3.25 ▲0.0237.25 ▲2.65

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

Ban Subdomain Emails: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.28 ▼0.271.91 ▲0.3146.44 ▲4.64
Dashboard /wp-admin2,195 ▲185.60 ▼0.0582.32 ▼8.9341.21 ▼1.87
Posts /wp-admin/edit.php2,103 ▲32.03 ▲0.0140.45 ▲1.4035.61 ▼1.06
Add New Post /wp-admin/post-new.php1,526 ▼023.46 ▲0.28615.26 ▼48.7569.95 ▲15.53
Media Library /wp-admin/upload.php1,400 ▼34.19 ▼0.04101.56 ▼0.1543.00 ▼3.04

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
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following
  • 1× 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/ban-subdomain-emails/ban-subdomain-emails.php:99

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need your attention:
  • Tags: Please reduce the number of tags, currently 31 tag instead of maximum 10
The official readme.txt might help

ban-subdomain-emails/ban-subdomain-emails.php Passed 13 tests

Analyzing the main PHP file in "Ban Subdomain Emails" version 1.0.0
89 characters long description:
Prevent people from registering with emails that contain a subdomain to help reduce spam.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Everything looks great! No dangerous files found in this plugin58 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1182358

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.24
Average class complexity8.00
▷ Minimum class complexity8.00
▷ Maximum class complexity8.00
Average method complexity1.88
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods8
▷ Static methods225.00%
▷ Public methods787.50%
▷ Protected methods00.00%
▷ Private methods112.50%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
PNG images were not found in this plugin