89% postpage-specific-custom-css

Code Review | Post/Page specific custom CSS

WordPress plugin Post/Page specific custom CSS scored89%from 54 tests.

About plugin

  • Plugin page: postpage-specific...
  • Plugin version: 0.2.4
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.8
  • WordPress version: 6.3.1
  • First release: Dec 16, 2016
  • Latest release: Jan 20, 2022
  • Number of updates: 43
  • Update frequency: every 43.2 days
  • Top authors: lukasznowicki (100%)

Code review

54 tests

User reviews

39 reviews

Install metrics

10,000+ active /61,129 total downloads

Benchmarks

Plugin footprint 83% from 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.08MB] [CPU: ▼10.42ms] Passed 4 tests

A check of server-side resources used by Post/Page specific custom CSS
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.65 ▲0.1944.58 ▲6.28
Dashboard /wp-admin3.51 ▲0.1745.15 ▼15.70
Posts /wp-admin/edit.php3.62 ▲0.2747.94 ▼4.93
Add New Post /wp-admin/post-new.php5.64 ▼0.2472.26 ▼22.83
Media Library /wp-admin/upload.php3.43 ▲0.2135.33 ▲1.79
Post/Page CSS /wp-admin/options-general.php?page=post-page-custom-css3.4033.54

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Post/Page specific custom CSS
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲4714.35 ▼0.211.56 ▼0.3938.26 ▼0.51
Dashboard /wp-admin2,199 ▲215.59 ▼0.0190.00 ▼8.9337.78 ▼4.79
Posts /wp-admin/edit.php2,104 ▲41.98 ▼0.0439.93 ▼3.9635.67 ▼1.67
Add New Post /wp-admin/post-new.php6,425 ▲4,89927.67 ▲4.42973.05 ▲322.1754.67 ▼2.38
Media Library /wp-admin/upload.php1,407 ▲74.26 ▲0.0495.49 ▲0.9142.13 ▼2.09
Post/Page CSS /wp-admin/options-general.php?page=post-page-custom-css9542.0322.5031.14

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

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

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

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
These attributes need to be fixed:
  • Tags: Please reduce the number of tags, currently 12 tag instead of maximum 10
You can look at the official readme.txt

postpage-specific-custom-css/post-page-specific-custom-css.php 85% from 13 tests

The primary PHP file in "Post/Page specific custom CSS" version 0.2.4 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Main file name: The principal plugin file should be the same as the plugin slug ("postpage-specific-custom-css.php" instead of "post-page-specific-custom-css.php")
  • Description: Please don't use more than 140 characters for the plugin description (currently 300 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
No dangerous file extensions were detected1,030 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP29739942
PO File1252588

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity53.00
▷ Minimum class complexity9.00
▷ Maximum class complexity97.00
Average method complexity2.81
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods50
▷ Static methods00.00%
▷ Public methods4488.00%
▷ Protected methods00.00%
▷ Private methods612.00%
Functions3
▷ Named functions00.00%
▷ Anonymous functions3100.00%
Constants20
▷ Global constants00.00%
▷ Class constants20100.00%
▷ Public constants20100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
5 PNG files occupy 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/flags/pl.png0.64KB0.17KB▼ 74.09%
assets/flags/us.png2.17KB1.47KB▼ 32.06%
assets/flags/ch.png1.28KB0.50KB▼ 61.19%
assets/flags/gb.png4.48KB2.28KB▼ 49.07%
assets/flags/eu.png1.91KB0.77KB▼ 59.48%