74% easy-color

Code Review | Easy Color

WordPress plugin Easy Color scored74%from 54 tests.

About plugin

  • Plugin page: easy-color
  • Plugin version: 2.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.4
  • WordPress version: 6.3.1
  • First release: May 19, 2020
  • Latest release: Jun 2, 2020
  • Number of updates: 8
  • Update frequency: every 2.6 days
  • Top authors: natacoimbra (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /4,102 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.02MB] [CPU: ▼11.86ms] Passed 4 tests

A check of server-side resources used by Easy Color
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.39 ▼0.0825.17 ▼22.35
Dashboard /wp-admin3.31 ▲0.0144.49 ▼7.79
Posts /wp-admin/edit.php3.36 ▲0.0147.88 ▲5.03
Add New Post /wp-admin/post-new.php5.89 ▲0.0182.40 ▼17.13
Media Library /wp-admin/upload.php3.23 ▲0.0034.28 ▼0.18

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 12 new files
Database: 9 new tables, 6 new options
New tables
wp_easyColorSelectorsCSSToBG_secondary
wp_easyColorSelectorsCSSToBorder_main
wp_easyColorSelectorsCSSToBorder_link
wp_easyColorSelectorsCSSToFont_main
wp_easyColorSelectorsCSSToFont_link
wp_easyColorSelectorsCSSToFont_secondary
wp_easyColorSelectorsCSSToBG_link
wp_easyColorSelectorsCSSToBorder_secondary
wp_easyColorSelectorsCSSToBG_main
New WordPress options
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Easy Color
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,465 ▼29614.24 ▼0.050.60 ▼1.1818.21 ▼24.10
Dashboard /wp-admin2,194 ▲175.56 ▼0.1097.68 ▲2.3561.80 ▲20.68
Posts /wp-admin/edit.php2,111 ▲81.98 ▲0.0037.93 ▼3.3031.70 ▼6.11
Add New Post /wp-admin/post-new.php1,535 ▲923.71 ▲0.60613.75 ▼27.90152.67 ▲99.55
Media Library /wp-admin/upload.php1,408 ▲114.12 ▼0.02104.60 ▼22.4362.59 ▲12.88

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • The uninstall procedure failed, leaving 9 tables in the database
    • wp_easyColorSelectorsCSSToFont_link
    • wp_easyColorSelectorsCSSToFont_secondary
    • wp_easyColorSelectorsCSSToBorder_secondary
    • wp_easyColorSelectorsCSSToBG_main
    • wp_easyColorSelectorsCSSToBorder_main
    • wp_easyColorSelectorsCSSToBG_secondary
    • wp_easyColorSelectorsCSSToFont_main
    • wp_easyColorSelectorsCSSToBorder_link
    • wp_easyColorSelectorsCSSToBG_link
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options

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 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
  • 4× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/easy-color/index.php
    • > /wp-content/plugins/easy-color/includes/functions.php
    • > /wp-content/plugins/easy-color/includes/easy-color.php
    • > /wp-content/plugins/easy-color/includes/settings.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: These screenshots require images: #1 (/assets/screenshot-1.png), #2 (/assets/screenshot-2.png)
You can look at the official readme.txt

easy-color/index.php 92% from 13 tests

The main PHP file in "Easy Color" ver. 2.1 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("easy-color.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Everything looks great! No dangerous files found in this plugin1,199 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
CSS548169850
PHP413454349

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.30
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%
Functions12
▷ Named functions12100.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.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
includes/imgs/icon.png1.17KB0.87KB▼ 25.60%