84% restrict-email-domains

Code Review | Restrict Email Domains

WordPress plugin Restrict Email Domains scored84%from 54 tests.

About plugin

  • Plugin page: restrict-email-do...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.0.1
  • WordPress version: 6.3.1
  • First release: Sep 9, 2022
  • Latest release: Sep 9, 2022
  • Number of updates: 2
  • Update frequency: every 0.5 days
  • Top authors: kasstechweb (100%)

Code review

54 tests

User reviews

1 review

Install metrics

80+ active /1,089 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

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

A check of server-side resources used by Restrict Email Domains
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0342.41 ▼0.73
Dashboard /wp-admin3.32 ▲0.0249.49 ▲3.66
Posts /wp-admin/edit.php3.37 ▲0.0249.45 ▲0.42
Add New Post /wp-admin/post-new.php5.90 ▲0.0289.57 ▼6.38
Media Library /wp-admin/upload.php3.25 ▲0.0241.69 ▲3.13
Add Domain /wp-admin/post-new.php?post_type=mk_domain3.2845.17
Email Domains /wp-admin/edit.php?post_type=mk_domain3.2940.09

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

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

Browser metrics Passed 4 tests

Restrict Email Domains: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,859 ▲9814.31 ▼0.351.95 ▲0.1540.06 ▼5.44
Dashboard /wp-admin2,240 ▲635.59 ▼0.0196.57 ▲3.5742.52 ▲2.38
Posts /wp-admin/edit.php2,142 ▲422.06 ▲0.0538.50 ▲0.6135.07 ▼2.49
Add New Post /wp-admin/post-new.php1,578 ▲3323.08 ▼0.04690.82 ▲44.8260.57 ▼2.60
Media Library /wp-admin/upload.php1,442 ▲424.28 ▲0.02115.22 ▲4.4951.42 ▲6.38
Add Domain /wp-admin/post-new.php?post_type=mk_domain1,4342.5156.4853.63
Email Domains /wp-admin/edit.php?post_type=mk_domain1,1032.0133.2632.35

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options

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
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/restrict-email-domains/restrict-email-domains.php:48

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
4 plugin tags: email register, block email register, email restrict, specific email register

restrict-email-domains/restrict-email-domains.php 92% from 13 tests

The main PHP file in "Restrict Email Domains" ver. 1.0 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 264 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected71 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP111971

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.29
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%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
PNG images were not found in this plugin