84% stop-emails

Code Review | Stop Emails

WordPress plugin Stop Emails scored84%from 54 tests.

About plugin

  • Plugin page: stop-emails
  • Plugin version: 1.2.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-6.3
  • WordPress version: 6.3.1
  • First release: Aug 20, 2013
  • Latest release: Jul 28, 2023
  • Number of updates: 53
  • Update frequency: every 68.5 days
  • Top authors: salcode (100%)

Code review

54 tests

User reviews

12 reviews

Install metrics

5,000+ active /52,272 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.11MB] [CPU: ▼1.64ms] Passed 4 tests

Analyzing server-side resources used by Stop Emails
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.60 ▲0.1440.72 ▲1.15
Dashboard /wp-admin3.45 ▲0.1448.15 ▼3.79
Posts /wp-admin/edit.php3.50 ▲0.1450.56 ▼0.16
Add New Post /wp-admin/post-new.php5.97 ▲0.0894.66 ▼0.47
Media Library /wp-admin/upload.php3.31 ▲0.0835.70 ▼2.13
Stop Emails /wp-admin/options-general.php?page=fe_stop_emails3.2729.98

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 20 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Stop Emails
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,824 ▲6314.34 ▼0.291.98 ▲0.3145.51 ▲0.80
Dashboard /wp-admin2,208 ▲345.67 ▲0.0689.28 ▼9.7841.17 ▲1.67
Posts /wp-admin/edit.php2,110 ▲71.98 ▲0.0341.35 ▼0.6335.47 ▼0.95
Add New Post /wp-admin/post-new.php1,540 ▲323.06 ▲4.90659.00 ▲41.6161.77 ▼10.50
Media Library /wp-admin/upload.php1,413 ▲134.26 ▲0.07100.19 ▲0.7044.64 ▲1.56
Stop Emails /wp-admin/options-general.php?page=fe_stop_emails8051.6726.2627.26

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 4× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/stop-emails/lib/admin-settings.php:9
    • > PHP Fatal error
      require_once(): Failed opening required '/includes/functions.php' (include_path='.:/usr/share/php') in wp-content/plugins/stop-emails/tests/phpunit/includes/bootstrap.php on line 9
    • > PHP Warning
      require_once(/includes/functions.php): failed to open stream: No such file or directory in wp-content/plugins/stop-emails/tests/phpunit/includes/bootstrap.php on line 9
    • > PHP Fatal error
      Uncaught Error: Class 'WP_UnitTestCase' not found in wp-content/plugins/stop-emails/tests/phpunit/tests/stop-emails.php:3

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 93% from 29 tests

readme.txt 94% from 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
These attributes need to be fixed:
  • Screenshots: A description for screenshot #2 is required in stop-emails/assets to your readme.txt
The official readme.txt might help

stop-emails/stop-emails.php 92% from 13 tests

The principal PHP file in "Stop Emails" v. 1.2.1 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 235 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected398 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP664200274
PO File23643110
XML10014

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.12
Average class complexity2.40
▷ Minimum class complexity1.00
▷ Maximum class complexity6.00
Average method complexity1.30
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods23
▷ Static methods28.70%
▷ Public methods23100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.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
5 PNG files occupy 0.13MB with 0.05MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
banner-772x250.png51.76KB23.13KB▼ 55.32%
icon-128x128.png8.10KB8.34KB0.00%
screenshot-1.png24.10KB7.24KB▼ 69.95%
screenshot-2.png25.15KB7.25KB▼ 71.18%
icon-256x256.png22.48KB23.24KB0.00%