74% colored-titles-for-each-post-type

Code Review | Colored Titles for each Post Type

WordPress plugin Colored Titles for each Post Type scored 74% from 54 tests.

About plugin

  • Plugin page: colored-titles-fo...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-3.5
  • WordPress version: 6.3.1
  • First release: Apr 5, 2013
  • Latest release: Apr 26, 2013
  • Number of updates: 6
  • Update frequency: every 3.5 days
  • Top authors: fmjtech (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active / 1,886 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▼0.09MB] [CPU: ▼9.76ms] Passed 4 tests

This is a short check of server-side resources used by Colored Titles for each Post Type
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0343.52 ▲2.69
Dashboard /wp-admin3.32 ▲0.0152.79 ▼0.02
Posts /wp-admin/edit.php3.39 ▲0.0354.19 ▼20.73
Add New Post /wp-admin/post-new.php5.47 ▼0.4285.58 ▼17.56
Media Library /wp-admin/upload.php3.23 ▲0.0035.33 ▼0.73

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 2 new files
Database: 1 new table, 7 new options
New tables
wp_posttypestitlecolor
New WordPress options
db_upgraded
posttypestitlecolor_db_version
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Colored Titles for each Post Type
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,816 ▲2713.62 ▼1.054.61 ▲2.8443.08 ▲1.70
Dashboard /wp-admin2,222 ▲165.85 ▼0.03105.78 ▼2.1038.61 ▼0.26
Posts /wp-admin/edit.php2,108 ▲192.03 ▲0.0138.98 ▼2.5836.28 ▼0.99
Add New Post /wp-admin/post-new.php1,541 ▲2723.34 ▲5.88669.43 ▲56.4059.41 ▲7.22
Media Library /wp-admin/upload.php1,404 ▲164.21 ▼0.0893.63 ▼6.9041.74 ▼1.72

Uninstaller [IO: ✅] [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
  • Zombie tables detected upon uninstall: 1 table
    • wp_posttypestitlecolor
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • 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
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_deactivation_hook() in wp-content/plugins/colored-titles-for-each-post-type/colored-post-type.php:29

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 93% 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: You can take inspiration from this readme.txt

colored-titles-for-each-post-type/colored-post-type.php 92% from 13 tests

This is the main PHP file of "Colored Titles for each Post Type" version 1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("colored-titles-for-each-post-type.php" instead of "colored-post-type.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected167 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP12221167

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.16
Average class complexity14.00
▷ Minimum class complexity14.00
▷ Maximum class complexity14.00
Average method complexity2.44
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods9
▷ Static methods00.00%
▷ Public methods9100.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
There are no PNG files in this plugin