84% custom-highlight-color

Code Review | Custom Highlight Color

WordPress plugin Custom Highlight Color scored84%from 54 tests.

About plugin

  • Plugin page: custom-highlight-...
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-6.3
  • WordPress version: 6.3.1
  • First release: Jul 4, 2016
  • Latest release: Sep 18, 2023
  • Number of updates: 13
  • Update frequency: every 202.5 days
  • Top authors: celloexpressions (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

1,000+ active /7,692 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
This plugin's installer ran successfully

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

This is a short check of server-side resources used by Custom Highlight Color
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0241.13 ▲5.41
Dashboard /wp-admin3.32 ▲0.0246.22 ▼1.07
Posts /wp-admin/edit.php3.37 ▲0.0145.38 ▲2.53
Add New Post /wp-admin/post-new.php5.90 ▲0.0182.48 ▼8.74
Media Library /wp-admin/upload.php3.24 ▲0.0138.52 ▲3.04

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Custom Highlight Color
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,828 ▲8213.24 ▼1.111.99 ▲0.2247.71 ▲5.43
Dashboard /wp-admin2,209 ▲245.90 ▲0.79104.31 ▼0.4442.80 ▼2.00
Posts /wp-admin/edit.php2,086 ▼31.99 ▼0.0434.48 ▼3.1935.34 ▼0.51
Add New Post /wp-admin/post-new.php1,533 ▲523.25 ▲0.17674.64 ▼13.9653.59 ▼1.95
Media Library /wp-admin/upload.php1,382 ▼34.27 ▼0.0193.31 ▼1.3441.85 ▼4.79

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
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, 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
Almost there! Just 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 add_action() in wp-content/plugins/custom-highlight-color/custom-highlight-color.php:32

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues 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
4 plugin tags: highlight, color, selection, custom color

custom-highlight-color/custom-highlight-color.php Passed 13 tests

Analyzing the main PHP file in "Custom Highlight Color" version 1.1
71 characters long description:
Customize the highlight color seen when selecting content on your site.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin104 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP23112392
JavaScript11712

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.26
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%
Functions8
▷ Named functions8100.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
No PNG files were detected