84% content-update-notification

Code Review | Content Update Notification

WordPress plugin Content Update Notification scored84%from 54 tests.

About plugin

  • Plugin page: content-update-no...
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.7-4.2
  • WordPress version: 6.3.1
  • First release: Apr 18, 2014
  • Latest release: Jun 19, 2015
  • Number of updates: 7
  • Update frequency: every 61.0 days
  • Top authors: norcross (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

200+ active /3,351 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.01MB] [CPU: ▼5.95ms] Passed 4 tests

An overview of server-side resources used by Content Update Notification
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0236.36 ▼1.74
Dashboard /wp-admin3.32 ▼0.0245.34 ▼18.15
Posts /wp-admin/edit.php3.44 ▲0.0845.37 ▼3.21
Add New Post /wp-admin/post-new.php5.90 ▲0.0295.66 ▼0.71
Media Library /wp-admin/upload.php3.24 ▲0.0235.36 ▼0.16
Content Notifications /wp-admin/tools.php?page=content-notification-settings3.2531.16

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
db_upgraded
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by Content Update Notification
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,818 ▲3214.21 ▼0.351.97 ▲0.0838.56 ▼5.81
Dashboard /wp-admin2,196 ▲185.56 ▼0.1582.99 ▼30.1039.86 ▲0.07
Posts /wp-admin/edit.php2,104 ▲42.00 ▼0.0239.69 ▼2.1535.66 ▼6.23
Add New Post /wp-admin/post-new.php1,540 ▲1418.35 ▼4.80629.39 ▼102.8677.40 ▲17.86
Media Library /wp-admin/upload.php1,404 ▲44.21 ▲0.02101.10 ▲3.8045.04 ▼0.69
Content Notifications /wp-admin/tools.php?page=content-notification-settings1,3945.50108.9757.29

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • 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
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/content-update-notification/lib/content.php:35
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/content-update-notification/lib/admin.php:35
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/content-update-notification/content-update-notification.php:29

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 Passed 29 tests

readme.txt Passed 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
6 plugin tags: compliance, alerts, email updates, notify, change notification...

content-update-notification/content-update-notification.php Passed 13 tests

The main PHP script in "Content Update Notification" version 1.0.2 is automatically included on every request by WordPress
70 characters long description:
Alert users and other people when content has been created or changed.

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
There were no executable files found in this plugin454 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP3169356365
PO File1222269
CSS16020

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity21.00
▷ Minimum class complexity20.00
▷ Maximum class complexity22.00
Average method complexity2.88
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods32
▷ Static methods2062.50%
▷ Public methods3196.88%
▷ Protected methods00.00%
▷ Private methods13.12%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG files were detected