74% hide-color-options

Code Review | Hide color options

WordPress plugin Hide color options scored74%from 54 tests.

About plugin

  • Plugin page: hide-color-options
  • Plugin version: 1.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.4-6.1
  • WordPress version: 6.3.1
  • First release: Mar 18, 2022
  • Latest release: Feb 25, 2023
  • Number of updates: 5
  • Update frequency: every 68.8 days
  • Top authors: haghs (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /229 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

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

Server-side resources used by Hide color options
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0037.89 ▼5.46
Dashboard /wp-admin3.00 ▼0.3023.12 ▼26.03
Posts /wp-admin/edit.php3.00 ▼0.3524.81 ▼25.91
Add New Post /wp-admin/post-new.php3.00 ▼2.8923.26 ▼71.42
Media Library /wp-admin/upload.php3.00 ▼0.2320.69 ▼14.56

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Hide color options
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.22 ▼1.151.84 ▼0.0843.53 ▼4.78
Dashboard /wp-admin2,203 ▲125.77 ▲0.90101.17 ▼0.4638.32 ▼5.15
Posts /wp-admin/edit.php2,086 ▼61.97 ▼0.1639.62 ▲4.2435.06 ▲1.92
Add New Post /wp-admin/post-new.php1,542 ▲918.47 ▼4.85612.59 ▼76.3061.74 ▼1.43
Media Library /wp-admin/upload.php1,388 ▼34.26 ▲0.0496.60 ▼4.5141.53 ▼1.48

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • Uninstall procedure validation failed for this plugin
    • > Notice in wp-content/plugins/hide-color-options/HideColorOptions.php+16
    Trying to access array offset on value of type null
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for 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 applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
  • 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/hide-color-options/HideColorOptions.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
1 plugin tags: hide color options

hide-color-options/HideColorOptions.php 92% from 13 tests

The main file in "Hide color options" v. 1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
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 ("hide-color-options.php" instead of "HideColorOptions.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected8 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP11108

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.00
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%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
PNG images were not found in this plugin