84% old-post-notification

Code Review | Old Post Notification

WordPress plugin Old Post Notification scored84%from 54 tests.

About plugin

  • Plugin page: old-post-notifica...
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2.1-5.2
  • WordPress version: 6.3.1
  • First release: May 25, 2012
  • Latest release: May 14, 2019
  • Number of updates: 9
  • Update frequency: every 282.9 days
  • Top authors: billerickson (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /2,751 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.16MB] [CPU: ▼1.15ms] Passed 4 tests

Server-side resources used by Old Post Notification
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.60 ▲0.1440.13 ▲0.12
Dashboard /wp-admin3.45 ▲0.1448.33 ▼2.85
Posts /wp-admin/edit.php3.56 ▲0.2154.42 ▲4.62
Add New Post /wp-admin/post-new.php6.08 ▲0.1991.12 ▼3.07
Media Library /wp-admin/upload.php3.37 ▲0.1437.77 ▲1.20
Old Post Notification /wp-admin/options-general.php?page=old-post-notification3.4042.60

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 24 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for Old Post Notification
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6913.23 ▼1.411.71 ▼0.0440.45 ▼2.24
Dashboard /wp-admin2,207 ▲195.94 ▲1.0895.21 ▼19.9440.15 ▼7.13
Posts /wp-admin/edit.php2,093 ▲222.05 ▲0.0439.81 ▲2.8134.66 ▼1.04
Add New Post /wp-admin/post-new.php6,305 ▲4,78326.14 ▲2.93934.08 ▲263.3565.88 ▲14.07
Media Library /wp-admin/upload.php1,389 ▲14.20 ▲0.03106.68 ▲5.4242.36 ▼1.59
Old Post Notification /wp-admin/options-general.php?page=old-post-notification1,4876.86132.9248.05

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
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts

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 applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/old-post-notification/plugin.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/old-post-notification/lib/metabox/init.php:36
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/old-post-notification/lib/metabox/example-functions.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
4 plugin tags: old, notification, mark, post

old-post-notification/plugin.php 92% from 13 tests

The main PHP file in "Old Post Notification" ver. 1.1 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("old-post-notification.php" instead of "plugin.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected1,218 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP3105180718
CSS2316320
Markdown122099
JavaScript2174381

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.62
Average class complexity51.67
▷ Minimum class complexity2.00
▷ Maximum class complexity142.00
Average method complexity7.91
▷ Minimum method complexity1.00
▷ Maximum method complexity85.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods22
▷ Static methods00.00%
▷ Public methods22100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
14 compressed PNG files occupy 0.02MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
lib/metabox/images/ui-bg_glass_65_ffffff_1x400.png0.10KB0.10KB▼ 5.71%
lib/metabox/images/ui-bg_glass_55_fbf9ee_1x400.png0.12KB0.14KB0.00%
lib/metabox/images/ico-delete.png0.70KB0.72KB0.00%
lib/metabox/images/ui-bg_glass_75_dadada_1x400.png0.11KB0.16KB0.00%
lib/metabox/images/ui-bg_highlight-soft_75_cccccc_1x100.png0.10KB0.17KB0.00%