94% rt-custom-css-page-and-post

Code Review | Royal Custom CSS for Page and Post

WordPress plugin Royal Custom CSS for Page and Post scored 94% from 54 tests.

About plugin

  • Plugin page: rt-custom-css-pag...
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-4.5.2
  • WordPress version: 5.8.1
  • First release: Aug 29, 2013
  • Latest release: Jun 2, 2016
  • Number of updates: 6
  • Update frequency: every 168.2 days
  • Top authors: royaltechbd (100%)

Code review

54 tests

User reviews

16 reviews

Install metrics

6,000+ active / 43,920 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.34MB] [CPU: ▼155.58ms] Passed 4 tests

A check of server-side resources used by Royal Custom CSS for Page and Post
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.0137.43 ▲2.80
Dashboard /wp-admin3.07 ▲0.0246.65 ▼0.90
Posts /wp-admin/edit.php3.12 ▲0.0251.58 ▲1.86
Add New Post /wp-admin/post-new.php4.05 ▼1.3846.64 ▼612.00
Media Library /wp-admin/upload.php3.01 ▲0.0133.58 ▼11.26

Server storage [IO: ▲0.00MB] [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: 2 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Royal Custom CSS for Page and Post
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,679 ▲8315.84 ▲0.347.19 ▼2.3650.29 ▲2.54
Dashboard /wp-admin2,970 ▲365.95 ▲0.01145.73 ▼10.94126.64 ▲7.95
Posts /wp-admin/edit.php2,739 ▼02.70 ▼0.0069.38 ▼2.3792.13 ▲1.30
Add New Post /wp-admin/post-new.php1,535 ▼4618.25 ▼0.27373.87 ▼47.46124.34 ▲2.97
Media Library /wp-admin/upload.php1,807 ▼05.00 ▼0.05151.17 ▼39.19130.17 ▼35.21

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The plugin uninstalled successfully, without leaving any zombie files or tables

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

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 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_action() in wp-content/plugins/rt-custom-css-page-and-post/rt-custom-css-page-and-post.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that require attention:
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === rt-custom-css-page-and-post === )
Please take inspiration from this readme.txt

rt-custom-css-page-and-post/rt-custom-css-page-and-post.php Passed 13 tests

The principal PHP file in "Royal Custom CSS for Page and Post" v. 1.2 is loaded by WordPress automatically on each request
40 characters long description:
Royal Custom CSS for every Page and Post

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous files found in this plugin28 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP15928

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.41
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%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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