72% old-posts-highlighter

Code Review | Old Posts Highlighter

WordPress plugin Old Posts Highlighter scored 72% from 54 tests.

About plugin

  • Plugin page: old-posts-highlig...
  • Plugin version: 1.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 2.5-3.9
  • WordPress version: 5.8.1
  • First release: Apr 18, 2014
  • Latest release: Apr 23, 2014
  • Number of updates: 38
  • Update frequency: every 0.1 days
  • Top authors: MKHFR (100%)

Code review

54 tests

User reviews

1 review

Install metrics

70+ active / 2,469 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▼0.78MB] [CPU: ▼179.83ms] Passed 4 tests

Server-side resources used by Old Posts Highlighter
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.96 ▲0.2435.45 ▲10.36
Dashboard /wp-admin2.86 ▼0.1922.94 ▼27.75
Posts /wp-admin/edit.php2.87 ▼0.2421.13 ▼25.26
Add New Post /wp-admin/post-new.php2.86 ▼2.5726.21 ▼659.64
Media Library /wp-admin/upload.php2.86 ▼0.1426.63 ▼6.66

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 10 new files
Database: no new tables, 10 new options
New WordPress options
OPH_omit_cats
OPH_at_top
OPH_age_limit
OPH_show_original_pubdate
OPH_FORCED_POSTS
OPH_interval
OPH_give_credit
OPH_last_update
OPH_interval_aleatoire
OPH_pos

Browser metrics Passed 4 tests

Old Posts Highlighter: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,699 ▲10315.96 ▲0.377.71 ▼3.2044.17 ▼3.43
Dashboard /wp-admin2,990 ▲596.17 ▲0.02147.08 ▼6.95105.95 ▼17.61
Posts /wp-admin/edit.php2,759 ▲232.83 ▲0.1365.27 ▼9.9995.09 ▼1.14
Add New Post /wp-admin/post-new.php1,697 ▲1418.59 ▼0.11379.74 ▼22.62115.55 ▲6.29
Media Library /wp-admin/upload.php1,826 ▲195.08 ▲0.04159.28 ▼9.83117.98 ▼11.08

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% 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
  • The plugin did not uninstall gracefully
    • > User deprecated in wp-includes/functions.php+5495
    has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
  • Zombie WordPress options were found after uninstall: 9 options
    • OPH_pos
    • OPH_interval_aleatoire
    • OPH_at_top
    • OPH_interval
    • OPH_age_limit
    • OPH_FORCED_POSTS
    • OPH_omit_cats
    • OPH_last_update
    • OPH_show_original_pubdate

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not an exhaustive test

SRP 50% 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
Almost there! Just fix the following items
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/old-posts-highlighter/Old_Posts_Highlighter.php:58
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/old-posts-highlighter/Old_Posts_Highlighter.php:58

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration 76% from 29 tests

readme.txt 75% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that require attention:
  • Tags: Please reduce the number of tags, currently 11 tag instead of maximum 10
  • Plugin Name: Please specify the plugin name on the first line ( === old-posts-highlighter === )
  • Donate link: Please fix this invalid url: ""
  • Screenshots: Screenshot #1 (screenshot-1.jpg) image not found
You can look at the official readme.txt

old-posts-highlighter/Old_Posts_Highlighter.php 77% from 13 tests

"Old Posts Highlighter" version 1.0.3's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Text Domain: The text domain follows the same naming rules as the plugin slug: lowercase characters and dashes
  • Description: Keep the plugin description shorter than 140 characters (currently 342 characters long)
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("old-posts-highlighter.php" instead of "Old_Posts_Highlighter.php")

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
Good job! No executable or dangerous file extensions detected708 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP310379445
PO File293110255
CSS1008

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.36
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%
Functions13
▷ Named functions13100.00%
▷ Anonymous functions00.00%
Constants17
▷ Global constants17100.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