10% juiz-outdated-post-message

Code Review | Juiz Outdated Post Message

WordPress plugin Juiz Outdated Post Message scored10%from 54 tests.

About plugin

  • Plugin page: juiz-outdated-pos...
  • Plugin version: 1.0.4
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.0.1
  • WordPress version: 6.3.1
  • First release: Oct 13, 2014
  • Latest release: Sep 24, 2022
  • Number of updates: 18
  • Update frequency: every 161.3 days
  • Top authors: CreativeJuiz (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

100+ active /2,305 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
It is recommended to fix the following installer errors
  • The plugin cannot be installed
    • > Notice in wp-content/plugins/juiz-outdated-post-message/admin/jodpm-admin.inc.php+78
    Trying to access array offset on value of type bool

Server metrics [RAM: ▲0.11MB] [CPU: ▼9.41ms] Passed 4 tests

This is a short check of server-side resources used by Juiz Outdated Post Message
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0638.75 ▼0.28
Dashboard /wp-admin3.43 ▲0.1345.02 ▼7.22
Posts /wp-admin/edit.php3.54 ▲0.1943.33 ▼1.58
Add New Post /wp-admin/post-new.php6.01 ▲0.1381.20 ▼28.56
Media Library /wp-admin/upload.php3.35 ▲0.1334.99 ▲2.40
Outdated Post Message /wp-admin/options-general.php?page=juiz-outdated-post-message3.3232.58

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 15 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
jodpm_settings
widget_recent-posts
db_upgraded
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Juiz Outdated Post Message
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲6013.35 ▼1.021.80 ▲0.0443.16 ▼2.00
Dashboard /wp-admin2,213 ▲255.85 ▼0.00104.82 ▼14.0947.74 ▲2.14
Posts /wp-admin/edit.php2,093 ▲41.99 ▼0.0734.35 ▼0.6733.52 ▲2.59
Add New Post /wp-admin/post-new.php6,227 ▲4,71318.99 ▲1.59920.64 ▲286.7777.42 ▲3.06
Media Library /wp-admin/upload.php1,389 ▲74.22 ▲0.00102.84 ▲4.6346.59 ▲3.32
Outdated Post Message /wp-admin/options-general.php?page=juiz-outdated-post-message9722.0828.1660.86

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP 0% 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 fix the following
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/juiz-outdated-post-message/admin/jodpm-admin-styles-scripts.php
  • 6× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Warning
      Use of undefined constant JUIZ_ODPM_PLUGIN_NAME - assumed 'JUIZ_ODPM_PLUGIN_NAME' (this will throw an Error in a future version of PHP) in wp-content/plugins/juiz-outdated-post-message/admin/jodpm-admin-styles-scripts.php on line 3
    • > PHP Warning
      Use of undefined constant JUIZ_ODPM_PLUGIN_NAME - assumed 'JUIZ_ODPM_PLUGIN_NAME' (this will throw an Error in a future version of PHP) in wp-content/plugins/juiz-outdated-post-message/admin/jodpm-admin-styles-scripts.php on line 53
    • > PHP Warning
      Use of undefined constant JUIZ_ODPM_PLUGIN_NAME - assumed 'JUIZ_ODPM_PLUGIN_NAME' (this will throw an Error in a future version of PHP) in wp-content/plugins/juiz-outdated-post-message/admin/jodpm-admin-styles-scripts.php on line 51
    • > PHP Warning
      Use of undefined constant JUIZ_ODPM_PLUGIN_NAME - assumed 'JUIZ_ODPM_PLUGIN_NAME' (this will throw an Error in a future version of PHP) in wp-content/plugins/juiz-outdated-post-message/admin/jodpm-admin-styles-scripts.php on line 56
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_uninstall_hook() in wp-content/plugins/juiz-outdated-post-message/admin/jodpm-admin.inc.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function trailingslashit() in wp-content/plugins/juiz-outdated-post-message/juiz-outdated-post-message.php:37

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Please take a look at the following user-side issues
    • > GET request to /wp-admin/options-general.php?page=juiz-outdated-post-message
    • > Network (severe)
    https://button.flattr.com/flattr-badge-large.png - Failed to load resource: the server responded with a status of 404 ()

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Please fix the following attributes:
  • Screenshots: These screenshots do not have images: #1 (The options page), #2 (The metabox in a post edition (specific options)), #3 (The message displayed before the content)
Please take inspiration from this readme.txt

juiz-outdated-post-message/juiz-outdated-post-message.php Passed 13 tests

The primary PHP file in "Juiz Outdated Post Message" version 1.0.4 is used by WordPress to initiate all plugin functionality
76 characters long description:
Add a message when your post is out to date (according to your own criteria)

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
No dangerous file extensions were detected611 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP313994389
PO File2102150211
CSS10011
HTML1010

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.54
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%
Functions28
▷ Named functions2692.86%
▷ Anonymous functions27.14%
Constants8
▷ Global constants8100.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
3 compressed PNG files occupy 0.04MB
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-3.png9.62KB9.59KB0.35%
screenshot-2.png4.92KB4.95KB0.00%
screenshot-1.png26.51KB26.59KB0.00%