100% highlight-new-posts

Code Review | Highlight New Posts

WordPress plugin Highlight New Posts scored 100% from 54 tests.

About plugin

  • Plugin page: highlight-new-posts
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-4.0
  • WordPress version: 5.8.1
  • First release: Jul 25, 2014
  • Latest release: Jul 25, 2014
  • Number of updates: 6
  • Update frequency: N/A
  • Top authors: DvanKooten (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active / 2,133 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼142.68ms] Passed 4 tests

Server-side resources used by Highlight New Posts
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.86 ▲0.1434.90 ▲11.44
Dashboard /wp-admin3.07 ▲0.0145.40 ▼3.36
Posts /wp-admin/edit.php3.12 ▲0.0145.84 ▼0.18
Add New Post /wp-admin/post-new.php5.42 ▼0.0190.16 ▼565.80
Media Library /wp-admin/upload.php3.01 ▲0.0035.76 ▼1.39

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 14 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Highlight New Posts: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,703 ▲10716.19 ▲0.717.27 ▼2.7055.17 ▲0.08
Dashboard /wp-admin2,967 ▲305.89 ▼0.06146.01 ▼17.61119.57 ▲2.97
Posts /wp-admin/edit.php2,739 ▼02.69 ▼0.0074.43 ▼0.8993.69 ▲4.76
Add New Post /wp-admin/post-new.php1,683 ▼018.77 ▲0.20394.15 ▼3.21112.98 ▼9.23
Media Library /wp-admin/upload.php1,810 ▲35.00 ▼0.01143.15 ▼23.80127.21 ▲3.58

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The plugin uninstalled successfully, without leaving any zombie files or tables

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP Passed 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
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need to be fixed:
  • Plugin Name: You should set the name of your plugin on the first line ( === highlight-new-posts === )
You can look at the official readme.txt

highlight-new-posts/highlight-new-posts.php Passed 13 tests

The primary PHP file in "Highlight New Posts" version 1.0 is used by WordPress to initiate all plugin functionality
44 characters long description:
Highlights new posts for returning visitors.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Success! There were no dangerous files found in this plugin112 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP5418998
CSS20014

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity4.00
▷ Minimum class complexity1.00
▷ Maximum class complexity9.00
Average method complexity1.82
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods11
▷ Static methods11100.00%
▷ Public methods981.82%
▷ Protected methods00.00%
▷ Private methods218.18%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants00.00%
▷ Class constants2100.00%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
PNG images were not found in this plugin