51% post-status-notifier-lite

Code Review | Post Status Notifier Lite

WordPress plugin Post Status Notifier Lite scored51%from 54 tests.

About plugin

  • Plugin page: post-status-notif...
  • Plugin version: 1.11.1
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-6.4
  • WordPress version: 6.3.1
  • First release: Jul 3, 2013
  • Latest release: Nov 7, 2023
  • Number of updates: 142
  • Update frequency: every 26.6 days
  • Top authors: worschtebrot (100%)

Code review

54 tests

User reviews

17 reviews

Install metrics

1,000+ active /43,875 total downloads

Benchmarks

Plugin footprint 65% 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: ▲1.95MB] [CPU: ▲13.17ms] 75% from 4 tests

This is a short check of server-side resources used by Post Status Notifier Lite
Please fix the following
  • RAM: Try to keep total memory usage under 10MB (currently 10.46MB on /wp-admin/options-general.php?page=post-status-notifier-lite)
PageMemory (MB)CPU Time (ms)
Home /5.05 ▲1.5951.20 ▲10.76
Dashboard /wp-admin5.35 ▲2.0560.77 ▲9.48
Posts /wp-admin/edit.php5.46 ▲2.1160.73 ▲12.44
Add New Post /wp-admin/post-new.php8.03 ▲2.14115.09 ▲22.22
Media Library /wp-admin/upload.php5.27 ▲2.0453.49 ▲19.99
Post Status Notifier Lite /wp-admin/options-general.php?page=post-status-notifier-lite10.4688.66

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 1,232 new files
Database: 1 new table, 8 new options
New tables
wp_psn_rules
New WordPress options
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
psn_options
db_upgraded
psn_activated_version
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

Post Status Notifier Lite: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,794 ▲3214.25 ▼0.101.62 ▼0.1940.73 ▼4.44
Dashboard /wp-admin2,199 ▲285.61 ▼0.1092.42 ▼8.0137.87 ▼6.22
Posts /wp-admin/edit.php2,107 ▲41.94 ▼0.0842.16 ▲0.0533.22 ▼4.45
Add New Post /wp-admin/post-new.php1,529 ▲223.13 ▲0.08684.87 ▲14.0962.18 ▲6.97
Media Library /wp-admin/upload.php1,407 ▲74.26 ▲0.06101.42 ▼7.1843.71 ▼1.28
Post Status Notifier Lite /wp-admin/options-general.php?page=post-status-notifier-lite1,4262.5170.0543.75

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • This plugin does not fully uninstall, leaving 1 table in the database
    • wp_psn_rules
  • Zombie WordPress options were found after uninstall: 8 options
    • widget_recent-comments
    • db_upgraded
    • psn_activated_version
    • widget_theysaidso_widget
    • widget_recent-posts
    • psn_options
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Please fix the following server-side errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=post-status-notifier-lite
    • > User deprecated in wp-content/plugins/post-status-notifier-lite/lib/IfwPsn/Vendor/Twig/Filter/Method.php+12
    The IfwPsn_Vendor_Twig_Filter_Method class is deprecated since version 1.12 and will be removed in 2.0. Use IfwPsn_Vendor_Twig_SimpleFilter instead.
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=post-status-notifier-lite
    • > User deprecated in wp-content/plugins/post-status-notifier-lite/lib/IfwPsn/Vendor/Twig/Filter.php+12
    The IfwPsn_Vendor_Twig_Filter class is deprecated since version 1.12 and will be removed in 2.0. Use IfwPsn_Vendor_Twig_SimpleFilter instead.
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=post-status-notifier-lite
    • > User deprecated in wp-content/plugins/post-status-notifier-lite/lib/IfwPsn/Vendor/Twig/Environment.php+1532
    Using an instance of "IfwPsn_Vendor_Twig_Filter_Method" for filter "date_locale" is deprecated since version 1.21. Use IfwPsn_Vendor_Twig_SimpleFilter instead.
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=post-status-notifier-lite
    • > User deprecated in wp-content/plugins/post-status-notifier-lite/lib/IfwPsn/Vendor/Twig/Filter/Function.php+12
    The IfwPsn_Vendor_Twig_Filter_Function class is deprecated since version 1.12 and will be removed in 2.0. Use IfwPsn_Vendor_Twig_SimpleFilter instead.
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=post-status-notifier-lite
    • > User deprecated in wp-content/plugins/post-status-notifier-lite/lib/IfwPsn/Vendor/Twig/Environment.php+1532
    Using an instance of "IfwPsn_Vendor_Twig_Filter_Function" for filter "truncate" is deprecated since version 1.21. Use IfwPsn_Vendor_Twig_SimpleFilter instead.
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=post-status-notifier-lite
    • > User deprecated in wp-content/plugins/post-status-notifier-lite/lib/IfwPsn/Vendor/Twig/Environment.php+1532
    Using an instance of "IfwPsn_Vendor_Twig_Filter_Function" for filter "wordwrap" is deprecated since version 1.21. Use IfwPsn_Vendor_Twig_SimpleFilter instead.
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=post-status-notifier-lite
    • > User deprecated in wp-content/plugins/post-status-notifier-lite/lib/IfwPsn/Vendor/Twig/Function/Method.php+13
    The IfwPsn_Vendor_Twig_Function_Method class is deprecated since version 1.12 and will be removed in 2.0. Use IfwPsn_Vendor_Twig_SimpleFunction instead.
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=post-status-notifier-lite
    • > User deprecated in wp-content/plugins/post-status-notifier-lite/lib/IfwPsn/Vendor/Twig/Function.php+12
    The IfwPsn_Vendor_Twig_Function class is deprecated since version 1.12 and will be removed in 2.0. Use IfwPsn_Vendor_Twig_SimpleFunction instead.
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=post-status-notifier-lite
    • > User deprecated in wp-content/plugins/post-status-notifier-lite/lib/IfwPsn/Vendor/Twig/Environment.php+1543
    Using an instance of "IfwPsn_Vendor_Twig_Function_Method" for function "print_r" is deprecated since version 1.21. Use IfwPsn_Vendor_Twig_SimpleFunction instead.
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=post-status-notifier-lite
    • > User deprecated in wp-content/plugins/post-status-notifier-lite/lib/IfwPsn/Vendor/Twig/Environment.php+1543
    Using an instance of "IfwPsn_Vendor_Twig_Function_Method" for function "uniqid" is deprecated since version 1.21. Use IfwPsn_Vendor_Twig_SimpleFunction instead.
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=post-status-notifier-lite
    • > User deprecated in wp-content/plugins/post-status-notifier-lite/lib/IfwPsn/Vendor/Twig/Environment.php+1543
    Using an instance of "IfwPsn_Vendor_Twig_Function_Method" for function "admin_url" is deprecated since version 1.21. Use IfwPsn_Vendor_Twig_SimpleFunction instead.

SRP 0% 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
The following issues need your attention
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/post-status-notifier-lite/lib/IfwPsn/Wp/Plugin/Cli/Executables/script.php
  • 1610× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      require_once(): Failed opening required 'IFW_PSN_LIB_ROOTIfwPsn/Vendor/Zend/Form/Decorator/Abstract.php' (include_path='.:/usr/share/php') in wp-content/plugins/post-status-notifier-lite/lib/IfwPsn/Vendor/Zend/Form/Decorator/Image.php on line 23
    • > PHP Fatal error
      Uncaught Error: Class 'IfwPsn_Vendor_Twig_Node' not found in wp-content/plugins/post-status-notifier-lite/lib/IfwPsn/Vendor/Twig/Node/Text.php:18
    • > PHP Fatal error
      require_once(): Failed opening required 'IFW_PSN_LIB_ROOTIfwPsn/Vendor/Zend/View/Helper/HtmlObject.php' (include_path='.:/usr/share/php') in wp-content/plugins/post-status-notifier-lite/lib/IfwPsn/Vendor/Zend/View/Helper/HtmlPage.php on line 26
    • > PHP Warning
      Use of undefined constant IFW_PSN_LIB_ROOT - assumed 'IFW_PSN_LIB_ROOT' (this will throw an Error in a future version of PHP) in wp-content/plugins/post-status-notifier-lite/lib/IfwPsn/Vendor/Zend/Cache/Backend/Static.php on line 26
    • > PHP Warning
      Use of undefined constant IFW_PSN_LIB_ROOT - assumed 'IFW_PSN_LIB_ROOT' (this will throw an Error in a future version of PHP) in wp-content/plugins/post-status-notifier-lite/lib/IfwPsn/Vendor/Zend/Log/Writer/ZendMonitor.php on line 24
    • > PHP Warning
      Use of undefined constant IFW_PSN_LIB_ROOT - assumed 'IFW_PSN_LIB_ROOT' (this will throw an Error in a future version of PHP) in wp-content/plugins/post-status-notifier-lite/lib/IfwPsn/Vendor/Zend/Application/Bootstrap/Bootstrap.php on line 26
    • > PHP Fatal error
      Uncaught Error: Class 'IfwPsn_Zend_Form' not found in wp-content/plugins/post-status-notifier-lite/lib/Psn/Admin/Form/TestMail.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'IfwPsn_Wp_Ajax_Response_Abstract' not found in wp-content/plugins/post-status-notifier-lite/lib/IfwPsn/Wp/Ajax/Response/Xml.php:11
    • > PHP Fatal error
      require_once(): Failed opening required 'IFW_PSN_LIB_ROOTIfwPsn/Vendor/Zend/Application/Resource/ResourceAbstract.php' (include_path='.:/usr/share/php') in wp-content/plugins/post-status-notifier-lite/lib/IfwPsn/Vendor/Zend/Application/Resource/Frontcontroller.php on line 26
    • > PHP Warning
      Use of undefined constant IFW_PSN_LIB_ROOT - assumed 'IFW_PSN_LIB_ROOT' (this will throw an Error in a future version of PHP) in wp-content/plugins/post-status-notifier-lite/lib/IfwPsn/Vendor/Zend/Validate/File/WordCount.php on line 25

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need your attention:
  • Screenshots: These screenshots require images: #1 (Completely customizable notification rules), #2 (Just a few use cases), #3 (Overview some options panels (available in the premium version)), #4 (HTML email (available in the premium version)), #5 (Placeholders), #6 (Template syntax (available in the premium version)), #7 (Logger (available in the premium version)), #8 (PSN's selftester), #9 (Comprehensive documentation)
  • Tags: There are too many tags (11 tag instead of maximum 10)
You can look at the official readme.txt

post-status-notifier-lite/post-status-notifier-lite.php 85% from 13 tests

The main PHP script in "Post Status Notifier Lite" version 1.11.1 is automatically included on every request by WordPress
It is important to fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 182 characters long)
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

Code Analysis 3% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Please make sure to remedy the following
  • Even if your plugin relies on executable files (for example a companion app), never distribute executable files with your plugin
    • .bat - Batch File in Windows
      • wp-content/plugins/post-status-notifier-lite/scripts/script.bat
118,600 lines of code in 1,125 files:
LanguageFilesBlank linesComment linesLines of code
PHP1,05420,80271,80698,856
XML834710,975
CSS262792253,173
JavaScript14468922,780
PO File2690891,946
HTML2732375
Twig13430243
Sass2250222
Bourne Shell35328
DOS Batch1002

PHP code 50% from 2 tests

A short review of cyclomatic complexity and code structure
It is recommended to fix the following
  • Method cyclomatic complexity should be reduced to less than 100 (currently 331)
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity14.69
▷ Minimum class complexity1.00
▷ Maximum class complexity785.00
Average method complexity3.00
▷ Minimum method complexity1.00
▷ Maximum method complexity331.00
Code structure
Namespaces1
Interfaces77
Traits0
Classes936
▷ Abstract classes939.94%
▷ Concrete classes84390.06%
▷ Final classes20.24%
Methods7,296
▷ Static methods77010.55%
▷ Public methods6,35887.14%
▷ Protected methods84011.51%
▷ Private methods981.34%
Functions100
▷ Named functions9494.00%
▷ Anonymous functions66.00%
Constants580
▷ Global constants40.69%
▷ Class constants57699.31%
▷ Public constants576100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
42 compressed PNG files occupy 0.25MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
skin/default/icons/heart.png0.30KB0.34KB0.00%
skin/default/icons/handshake.png1.10KB1.10KB▼ 0.53%
docs/assets/blueprint-css/plugins/link-icons/icons/feed.png0.67KB0.90KB0.00%
skin/default/icons/lifesaver.png2.67KB1.92KB▼ 28.06%
docs/assets/blueprint-css/plugins/buttons/icons/cross.png0.64KB0.72KB0.00%