68% disable-email

Code Review | Wordpress Disable Email plugin

WordPress plugin Wordpress Disable Email plugin scored68%from 54 tests.

About plugin

  • Plugin page: disable-email
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.5
  • WordPress version: 6.3.1
  • First release: Sep 8, 2015
  • Latest release: Apr 3, 2016
  • Number of updates: 11
  • Update frequency: every 19.0 days
  • Top authors: acsnaterse (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,645 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▼0.83MB] [CPU: ▼34.90ms] Passed 4 tests

An overview of server-side resources used by Wordpress Disable Email plugin
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.78 ▲0.0444.25 ▲1.06
Dashboard /wp-admin3.39 ▼0.1728.74 ▼26.86
Posts /wp-admin/edit.php3.40 ▼0.2828.73 ▼29.89
Add New Post /wp-admin/post-new.php3.39 ▼2.7526.64 ▼70.47
Media Library /wp-admin/upload.php3.39 ▼0.0928.79 ▼12.38
Disable Email /wp-admin/options-general.php?page=disable-email3.4029.68

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 2 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
disable_email_options
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for Wordpress Disable Email plugin
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,818 ▲5714.26 ▼0.152.00 ▲0.3243.09 ▲2.06
Dashboard /wp-admin2,199 ▲225.57 ▼0.1685.78 ▼2.7438.43 ▼3.65
Posts /wp-admin/edit.php2,104 ▲41.99 ▼0.0638.30 ▲0.5836.07 ▼3.58
Add New Post /wp-admin/post-new.php1,548 ▼623.30 ▲0.09700.38 ▼18.0156.49 ▲3.41
Media Library /wp-admin/upload.php1,401 ▲14.15 ▼0.17103.75 ▼3.2047.92 ▲3.46
Disable Email /wp-admin/options-general.php?page=disable-email8032.0328.6232.27

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • The plugin did not uninstall gracefully
    • > Deprecated in wp-content/plugins/disable-email/disable_email.php+81
    Function create_function() is deprecated
  • The uninstall procedure has failed, leaving 7 options in the database
    • db_upgraded
    • disable_email_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Smoke test failed, please fix the following
    • > GET request to /wp-admin/options-general.php?page=disable-email
    • > Deprecated in wp-content/plugins/disable-email/disable_email.php+81
    Function create_function() is deprecated

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 items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/disable-email/disable_email.php:121

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
2 plugin tags: email, wp_mail

disable-email/disable_email.php 92% from 13 tests

The primary PHP file in "Wordpress Disable Email plugin" version 1.0 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("disable-email.php" instead of "disable_email.php")

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
Success! There were no dangerous files found in this plugin272 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP16953272

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity5.00
▷ Minimum class complexity5.00
▷ Maximum class complexity5.00
Average method complexity1.40
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods10
▷ Static methods00.00%
▷ Public methods10100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG images were found in this plugin