84% add-style-to-post

Code Review | Add Style To Post

WordPress plugin Add Style To Post scored84%from 54 tests.

About plugin

  • Plugin page: add-style-to-post
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.8
  • WordPress version: 6.3.1
  • First release: Mar 18, 2014
  • Latest release: Mar 18, 2014
  • Number of updates: 5
  • Update frequency: N/A
  • Top authors: eflyjason (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,395 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 gracefully, with no errors

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

This is a short check of server-side resources used by Add Style To Post
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0134.75 ▼5.54
Dashboard /wp-admin3.31 ▼0.0345.05 ▼15.01
Posts /wp-admin/edit.php3.36 ▲0.0149.70 ▲3.53
Add New Post /wp-admin/post-new.php5.89 ▲0.0183.53 ▼13.08
Media Library /wp-admin/upload.php3.23 ▲0.0133.05 ▼3.21

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

Add Style To Post: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.27 ▼0.451.63 ▼0.0438.09 ▼2.01
Dashboard /wp-admin2,195 ▲215.53 ▼0.0485.65 ▼1.7936.80 ▼6.58
Posts /wp-admin/edit.php2,103 ▲31.99 ▼0.0437.88 ▲2.8437.45 ▼0.11
Add New Post /wp-admin/post-new.php1,535 ▲718.30 ▼4.63689.93 ▼0.6263.97 ▲4.34
Media Library /wp-admin/upload.php1,400 ▼04.15 ▼0.0596.03 ▲0.8542.76 ▼6.62

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts

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

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/add-style-to-post/add-style-to-post.php:34

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
3 plugin tags: shortcode, style, post

add-style-to-post/add-style-to-post.php 92% from 13 tests

The principal PHP file in "Add Style To Post" v. 1.0.1 is loaded by WordPress automatically on each request
You should first fix the following items:
  • Domain Path: The domain path folder was not found ("/lang/")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected29 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1122529

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.29
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%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There are no PNG files in this plugin