84% color-posts

Code Review | Color Posts

WordPress plugin Color Posts scored84%from 54 tests.

About plugin

  • Plugin page: color-posts
  • Plugin version: 1.6.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.3
  • WordPress version: 6.3.1
  • First release: Aug 6, 2014
  • Latest release: Sep 5, 2023
  • Number of updates: 43
  • Update frequency: every 77.1 days
  • Top authors: jeherve (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

50+ active /8,771 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
Install script ran successfully

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

Analyzing server-side resources used by Color Posts
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0236.41 ▼4.00
Dashboard /wp-admin3.32 ▲0.0244.14 ▼5.09
Posts /wp-admin/edit.php3.37 ▲0.0146.54 ▲1.22
Add New Post /wp-admin/post-new.php5.90 ▲0.0180.70 ▼12.63
Media Library /wp-admin/upload.php3.24 ▲0.0134.95 ▲0.07

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

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

Browser metrics Passed 4 tests

Color Posts: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,832 ▲9714.73 ▲0.302.23 ▲0.4738.39 ▼6.18
Dashboard /wp-admin2,213 ▲225.81 ▼0.09100.49 ▼16.5238.93 ▼5.11
Posts /wp-admin/edit.php2,098 ▲122.02 ▲0.0241.33 ▲5.8236.33 ▲0.27
Add New Post /wp-admin/post-new.php1,521 ▼2117.47 ▼0.82670.30 ▲33.6460.87 ▼5.77
Media Library /wp-admin/upload.php1,389 ▲14.24 ▼0.0093.43 ▼4.9940.60 ▼4.08

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not 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 fix the following items
  • 4× 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-posts/functions.color-posts.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/color-posts/utilities.color-posts.php:135
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/color-posts/admin.color-posts.php:20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/color-posts/color-posts.php:14

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 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
5 plugin tags: colors, theme, posts, jetpack, tonesque

color-posts/color-posts.php 92% from 13 tests

The principal PHP file in "Color Posts" v. 1.6.2 is loaded by WordPress automatically on each request
The following require your attention:
  • Domain Path: The domain path folder does not exist ("/languages")

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
Success! There were no dangerous files found in this plugin266 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP465238266

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity7.00
▷ Minimum class complexity7.00
▷ Maximum class complexity7.00
Average method complexity1.86
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods114.29%
▷ Public methods685.71%
▷ Protected methods00.00%
▷ Private methods114.29%
Functions14
▷ Named functions14100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG files were detected