83% old-post-warning

Code Review | Old Post Warning

WordPress plugin Old Post Warning scored83%from 54 tests.

About plugin

  • Plugin page: old-post-warning
  • Plugin version: 0.1 alpha...
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.2
  • WordPress version: 6.3.1
  • First release: May 21, 2019
  • Latest release: May 21, 2019
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: zionptm (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /509 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
This plugin's installer ran successfully

Server metrics [RAM: ▼0.41MB] [CPU: ▼27.14ms] Passed 4 tests

An overview of server-side resources used by Old Post Warning
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.43 ▼0.0335.84 ▼8.59
Dashboard /wp-admin3.11 ▼0.1932.80 ▼19.98
Posts /wp-admin/edit.php3.25 ▼0.1135.94 ▼15.69
Add New Post /wp-admin/post-new.php4.60 ▼1.2841.77 ▼64.31
Media Library /wp-admin/upload.php3.18 ▼0.0531.81 ▼7.21

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

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

Browser metrics Passed 4 tests

Old Post Warning: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,828 ▲8215.00 ▲0.611.80 ▼0.1045.11 ▲0.93
Dashboard /wp-admin2,225 ▲346.61 ▲0.71111.82 ▲5.9042.87 ▼4.31
Posts /wp-admin/edit.php2,268 ▲1793.19 ▲1.1951.39 ▲10.0633.06 ▼0.17
Add New Post /wp-admin/post-new.php1,549 ▲3023.12 ▲0.19642.71 ▼7.5954.26 ▼1.52
Media Library /wp-admin/upload.php1,565 ▲1774.99 ▲0.83106.38 ▲4.6344.13 ▲2.64

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for 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
Please take a closer look at the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/old-post-warning/plugin.php:26

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that need to be fixed:
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === old-post-warning === )
The official readme.txt is a good inspiration

old-post-warning/plugin.php 85% from 13 tests

This is the main PHP file of "Old Post Warning" version 0.1 alpha..., providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("old-post-warning.php" instead of "plugin.php")
  • Version: The version number should be digits and periods (ex. "1.0.3" instead of "0.1 alpha...")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
There were no executable files found in this plugin50 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1182250

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.09
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG files were detected