84% color-my-posts

Code Review | Color My Posts

WordPress plugin Color My Posts scored84%from 54 tests.

About plugin

  • Plugin page: color-my-posts
  • Plugin version: 0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.5
  • WordPress version: 6.3.1
  • First release: Nov 26, 2012
  • Latest release: Dec 17, 2012
  • Number of updates: 4
  • Update frequency: every 5.3 days
  • Top authors: corsonr (100%)

Code review

54 tests

User reviews

8 reviews

Install metrics

100+ active /3,961 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼8.22ms] Passed 4 tests

Analyzing server-side resources used by Color My Posts
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0138.80 ▲1.13
Dashboard /wp-admin3.31 ▲0.0145.40 ▼3.10
Posts /wp-admin/edit.php3.37 ▲0.0143.60 ▼4.83
Add New Post /wp-admin/post-new.php5.89 ▲0.0080.47 ▼22.99
Media Library /wp-admin/upload.php3.24 ▲0.0033.28 ▼1.97

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by Color My Posts
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,803 ▲6813.33 ▼1.041.73 ▼0.0743.47 ▲1.33
Dashboard /wp-admin2,212 ▲214.82 ▼0.1298.94 ▼4.0040.02 ▼6.13
Posts /wp-admin/edit.php2,092 ▼02.01 ▲0.0438.05 ▼1.0432.86 ▼3.66
Add New Post /wp-admin/post-new.php1,536 ▲323.10 ▼0.02669.78 ▼25.9363.10 ▲9.95
Media Library /wp-admin/upload.php1,394 ▲64.21 ▼0.0194.89 ▼15.0441.71 ▼4.38

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
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts

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 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please take a closer look at the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/color-my-posts/color-my-posts.php:24

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 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need your attention:
  • Screenshots: Screenshot #1 (Screenshot 1) image not found
You can take inspiration from this readme.txt

color-my-posts/color-my-posts.php Passed 13 tests

This is the main PHP file of "Color My Posts" version 0.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
87 characters long description:
A little plugin to color post rows depending on the posts' status in the administration

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 detected37 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1172537

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.00
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods2
▷ Static methods00.00%
▷ Public methods2100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.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
No PNG files were detected