83% rd-add-palecolors

Code Review | RD Add Palecolors

WordPress plugin RD Add Palecolors scored83%from 54 tests.

About plugin

  • Plugin page: rd-add-palecolors
  • Plugin version: 1.2.2
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3.2-6.3
  • WordPress version: 6.3.1
  • First release: Jan 25, 2020
  • Latest release: Aug 9, 2023
  • Number of updates: 20
  • Update frequency: every 64.7 days
  • Top authors: yat8823jp (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /620 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.02MB] [CPU: ▼8.32ms] Passed 4 tests

Server-side resources used by RD Add Palecolors
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0335.86 ▼11.02
Dashboard /wp-admin3.33 ▲0.0344.70 ▼8.40
Posts /wp-admin/edit.php3.38 ▲0.0245.04 ▼0.80
Add New Post /wp-admin/post-new.php6.16 ▲0.2789.31 ▼12.39
Media Library /wp-admin/upload.php3.26 ▲0.0234.60 ▼1.46

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for RD Add Palecolors
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,802 ▲5613.21 ▼1.344.31 ▲2.4737.75 ▼6.00
Dashboard /wp-admin2,203 ▲155.81 ▼0.0698.71 ▼12.2837.04 ▼7.29
Posts /wp-admin/edit.php2,092 ▲31.98 ▼0.0737.88 ▼0.8535.00 ▼0.87
Add New Post /wp-admin/post-new.php1,528 ▲1423.41 ▲5.79657.69 ▲39.9853.13 ▼0.73
Media Library /wp-admin/upload.php1,388 ▲34.29 ▲0.0595.93 ▼3.9742.48 ▲0.54

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • 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
Even though everything seems fine, this is not an exhaustive test

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
Please fix the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/rd-add-palecolors/main.php:136

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)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 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
Please fix the following attributes:
  • Screenshots: Add an image for screenshot #1 (Text or background color add pale theme.)
Please take inspiration from this readme.txt

rd-add-palecolors/main.php 85% from 13 tests

The main PHP file in "RD Add Palecolors" ver. 1.2.2 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("rd-add-palecolors.php" instead of "main.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
No dangerous file extensions were detected264 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
CSS1470138
PHP1314126

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Everything seems fine, there were no complexity issues found
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%
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

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
1 PNG file occupies 0.09MB with 0.07MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png91.84KB21.63KB▼ 76.45%