84% simple-new-post-emails

Code Review | Simple New Post Emails

WordPress plugin Simple New Post Emails scored84%from 54 tests.

About plugin

  • Plugin page: simple-new-post-e...
  • Plugin version: 0.7.1
  • PHP compatiblity: +
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-5.9
  • WordPress version: 6.3.1
  • First release: Sep 18, 2014
  • Latest release: Jan 25, 2022
  • Number of updates: 31
  • Update frequency: every 86.7 days
  • Top authors: ChrisHardie (67.74%)helen (22.58%)10up (16.13%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,979 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.05MB] [CPU: ▼3.39ms] Passed 4 tests

Analyzing server-side resources used by Simple New Post Emails
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0634.92 ▼7.46
Dashboard /wp-admin3.36 ▲0.0548.52 ▼0.83
Posts /wp-admin/edit.php3.41 ▲0.0550.37 ▲3.63
Add New Post /wp-admin/post-new.php5.94 ▲0.0594.76 ▼2.76
Media Library /wp-admin/upload.php3.28 ▲0.0532.07 ▼2.51

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 4 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
db_upgraded
widget_snpe-widget
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Simple New Post Emails
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲9014.48 ▲0.101.91 ▲0.1242.18 ▼4.36
Dashboard /wp-admin2,206 ▲185.90 ▲0.02107.76 ▼0.3043.14 ▼3.18
Posts /wp-admin/edit.php2,092 ▲32.05 ▲0.0838.47 ▲0.3534.38 ▼1.53
Add New Post /wp-admin/post-new.php1,536 ▲323.35 ▲0.12650.42 ▼0.7248.72 ▼2.69
Media Library /wp-admin/upload.php1,388 ▼34.21 ▼0.0198.06 ▼0.8741.86 ▼2.87

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin does not fully uninstall, leaving 7 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_snpe-widget
    • can_compress_scripts
    • 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
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/simple-new-post-emails/inc/widget-snpe.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/simple-new-post-emails/inc/widget-snpe.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 93% 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 your attention:
  • Requires php: Invalid plugin version format
You can look at the official readme.txt

simple-new-post-emails/simple-new-post-emails.php 92% from 13 tests

The entry point to "Simple New Post Emails" version 0.7.1 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Requires PHP: Periods and digits should be used for the required version number (ex. "7.0" instead of "")

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 plugin173 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP24077146
JavaScript14027

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity8.00
▷ Minimum class complexity3.00
▷ Maximum class complexity13.00
Average method complexity2.08
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods13
▷ Static methods00.00%
▷ Public methods1292.31%
▷ Protected methods00.00%
▷ Private methods17.69%
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

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