74% wp-post-styling

Code Review | WP Post Styling

WordPress plugin WP Post Styling scored74%from 54 tests.

About plugin

  • Plugin page: wp-post-styling
  • Plugin version: 1.3.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.2-6.0
  • WordPress version: 6.3.1
  • First release: Dec 22, 2008
  • Latest release: Jun 2, 2022
  • Number of updates: 35
  • Update frequency: every 140.3 days
  • Top authors: joedolson (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

600+ active /35,076 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.08MB] [CPU: ▼5.62ms] Passed 4 tests

Analyzing server-side resources used by WP Post Styling
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0846.54 ▲5.02
Dashboard /wp-admin3.40 ▲0.0548.79 ▼12.24
Posts /wp-admin/edit.php3.51 ▲0.1549.36 ▼2.85
Add New Post /wp-admin/post-new.php5.98 ▲0.0993.78 ▼8.15
Media Library /wp-admin/upload.php3.32 ▲0.0935.14 ▲0.78
WP Post Styling /wp-admin/options-general.php?page=wp-post-styling/wp-post-styling.php3.3942.41

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 14 new files
Database: 1 new table, 13 new options
New tables
wp_post_styling_library
New WordPress options
widget_recent-posts
theysaidso_admin_options
wp_post_styling_version
jd-post-styling-screen
post_styling_db_version
db_upgraded
can_compress_scripts
post-styling-initial
jd-post-styling-default
widget_recent-comments
...

Browser metrics Passed 4 tests

An overview of browser requirements for WP Post Styling
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.40 ▲0.021.99 ▼0.1243.45 ▼0.55
Dashboard /wp-admin2,202 ▲225.60 ▼0.0986.29 ▼12.5240.79 ▼0.45
Posts /wp-admin/edit.php2,104 ▲42.00 ▲0.0241.64 ▲1.4034.25 ▼1.80
Add New Post /wp-admin/post-new.php6,240 ▲4,70919.16 ▼3.91898.72 ▲283.1665.16 ▲11.96
Media Library /wp-admin/upload.php1,404 ▲44.19 ▼0.0395.76 ▼8.4142.67 ▼0.48
WP Post Styling /wp-admin/options-general.php?page=wp-post-styling/wp-post-styling.php1,3815.24132.2845.59

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • Zombie tables detected upon uninstall: 1 table
    • wp_post_styling_library
  • This plugin did not uninstall successfully, leaving 8 options in the database
    • widget_recent-comments
    • post_styling_db_version
    • db_upgraded
    • widget_recent-posts
    • jd-post-styling-library
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means 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
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 add_action() in wp-content/plugins/wp-post-styling/wp-post-styling.php:30
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/wp-post-styling/wp-post-styling-manager.php:4

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

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
Attributes that need to be fixed:
  • Screenshots: Add images for these screenshots: #1 (WP Post Styling Settings Page), #2 (WP Post Styling Custom Styles Box)
You can look at the official readme.txt

wp-post-styling/wp-post-styling.php Passed 13 tests

The primary PHP file in "WP Post Styling" version 1.3.2 is used by WordPress to initiate all plugin functionality
129 characters long description:
Allows you to define custom styles for any specific post or page on your WordPress site. Helps reduce clutter in your stylesheet.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
No dangerous file extensions were detected702 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP35043687
CSS20115

PHP code Passed 2 tests

This is a very shot review 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.43
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%
Functions22
▷ Named functions22100.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
2 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png4.22KB2.72KB▼ 35.58%
screenshot-1.png25.78KB14.93KB▼ 42.10%