83% simple-post-status-notifications

Code Review | Simple post status notifications

WordPress plugin Simple post status notifications scored83%from 54 tests.

About plugin

  • Plugin page: simple-post-statu...
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Mar 6, 2015
  • Latest release: Jun 24, 2015
  • Number of updates: 8
  • Update frequency: every 17.4 days
  • Top authors: dientuki (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /1,401 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.08MB] [CPU: ▼8.66ms] Passed 4 tests

A check of server-side resources used by Simple post status notifications
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0646.79 ▼7.90
Dashboard /wp-admin3.40 ▲0.0949.26 ▼3.33
Posts /wp-admin/edit.php3.51 ▲0.1547.26 ▼5.29
Add New Post /wp-admin/post-new.php5.98 ▲0.0988.11 ▼18.12
Media Library /wp-admin/upload.php3.32 ▲0.0936.98 ▼0.34
Simple Post Status Notifications /wp-admin/options-general.php?page=spsn-settings3.2933.32

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

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

Browser metrics Passed 4 tests

Simple post status notifications: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.32 ▲0.031.69 ▼0.1242.87 ▼2.55
Dashboard /wp-admin2,196 ▲165.57 ▼0.0483.36 ▼8.7539.07 ▼3.41
Posts /wp-admin/edit.php2,104 ▲71.94 ▼0.0834.62 ▼2.0533.10 ▲1.16
Add New Post /wp-admin/post-new.php1,529 ▲122.90 ▼0.13639.79 ▼13.7146.36 ▼17.50
Media Library /wp-admin/upload.php1,401 ▲14.20 ▼0.03106.94 ▼10.9547.09 ▼0.80
Simple Post Status Notifications /wp-admin/options-general.php?page=spsn-settings8762.0025.8025.08

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
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • 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
Even though no errors were found, this is by no means 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
Please fix the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/simple-post-status-notifications/spsn.php:441

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 81% 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
Attributes that need to be fixed:
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === simple-post-status-notifications === )
  • Tags: Too many tags (25 tag instead of maximum 10); only the first 5 tags are used in your directory listing
  • Requires at least: The plugin version is formatted incorrectly
You can take inspiration from this readme.txt

simple-post-status-notifications/spsn.php 85% from 13 tests

The main PHP script in "Simple post status notifications" version 1.1 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 141 characters long)
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("simple-post-status-notifications.php" instead of "spsn.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected403 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP276104280
PO File24040123

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity28.00
▷ Minimum class complexity28.00
▷ Maximum class complexity28.00
Average method complexity2.50
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods18
▷ Static methods15.56%
▷ Public methods1794.44%
▷ Protected methods00.00%
▷ Private methods15.56%
Functions2
▷ Named functions2100.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
There were not PNG files found in your plugin