68% colorful-post

Code Review | Colorful Post

WordPress plugin Colorful Post scored 68% from 54 tests.

About plugin

  • Plugin page: colorful-post
  • Plugin version: 1.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-4.3
  • WordPress version: 6.3.1
  • First release: Aug 7, 2015
  • Latest release: Oct 14, 2015
  • Number of updates: 9
  • Update frequency: every 8.2 days
  • Top authors: freebeer2go (100%)

Code review

54 tests

User reviews

1 review

Install metrics

60+ active / 2,089 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▼0.94MB] [CPU: ▼30.40ms] Passed 4 tests

A check of server-side resources used by Colorful Post
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0239.55 ▲1.99
Dashboard /wp-admin3.00 ▼0.3021.95 ▼26.00
Posts /wp-admin/edit.php3.00 ▼0.3524.61 ▼21.14
Add New Post /wp-admin/post-new.php3.00 ▼2.8823.14 ▼60.89
Media Library /wp-admin/upload.php3.00 ▼0.2321.94 ▼13.55

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Colorful Post
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,827 ▲3813.38 ▲0.101.74 ▲0.1445.53 ▲4.38
Dashboard /wp-admin2,233 ▲274.99 ▼0.84101.28 ▲5.3639.97 ▲0.64
Posts /wp-admin/edit.php2,122 ▲332.35 ▲0.3537.30 ▲4.2331.31 ▼2.29
Add New Post /wp-admin/post-new.php1,535 ▼617.53 ▼5.76710.16 ▲26.3537.01 ▼19.80
Media Library /wp-admin/upload.php1,415 ▲274.57 ▲0.42108.13 ▼6.8846.89 ▼1.38
Colorful Post /wp-admin/colorful-post.php260.440.1717.16

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • The plugin did not uninstall gracefully
    • > User deprecated in wp-includes/functions.php+5737
    Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 50% 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 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
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/colorful-post/templates/index.php:2

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
These are user-side errors you should fix
    • > GET request to /wp-admin/colorful-post.php
    • > Network (severe)
    wp-admin/colorful-post.php - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
9 plugin tags: posts, post, plugin, color title, colorful posts...

colorful-post/colorful-post.php Passed 13 tests

Analyzing the main PHP file in "Colorful Post" version 1.0.3
94 characters long description:
A simple 'post title color' plugin that lets you select the color of your post title manually.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin204 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP29790159
JavaScript1121327
CSS14818

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity16.00
▷ Minimum class complexity16.00
▷ Maximum class complexity16.00
Average method complexity2.50
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods10
▷ Static methods00.00%
▷ Public methods990.00%
▷ Protected methods00.00%
▷ Private methods110.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
There are no PNG files in this plugin