84% colorfului

Code Review | ColorfulUI

WordPress plugin ColorfulUI scored84%from 54 tests.

About plugin

  • Plugin page: colorfului
  • Plugin version: 0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 0.2+
  • WordPress version: 6.3.1
  • First release: Apr 20, 2017
  • Latest release: Apr 20, 2017
  • Number of updates: 4
  • Update frequency: every 0.3 days
  • Top authors: katsuakikureyama (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /658 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

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

A check of server-side resources used by ColorfulUI
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0236.50 ▼5.39
Dashboard /wp-admin3.33 ▼0.0247.17 ▼17.36
Posts /wp-admin/edit.php3.38 ▲0.0241.57 ▼1.13
Add New Post /wp-admin/post-new.php5.91 ▲0.0280.58 ▼23.82
Media Library /wp-admin/upload.php3.25 ▲0.0233.64 ▼0.82

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for ColorfulUI
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,812 ▲4113.22 ▼1.541.62 ▼0.4239.82 ▼6.41
Dashboard /wp-admin2,218 ▲305.83 ▲0.0296.39 ▼14.6048.73 ▲3.64
Posts /wp-admin/edit.php2,104 ▲151.97 ▼0.0235.63 ▼1.6130.34 ▼3.64
Add New Post /wp-admin/post-new.php1,530 ▲1621.10 ▲3.54654.97 ▼27.2353.12 ▼9.08
Media Library /wp-admin/upload.php1,400 ▲124.30 ▲0.0498.00 ▲0.0743.61 ▼3.28

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 were found after uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments

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 everything seems fine, this is not 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
Please fix the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/colorfului/ColorfulUI.php:18

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Please fix the following attributes:
  • Screenshots: Add images for these screenshots: #1 (generate random ui), #2 (generate random ui)
Please take inspiration from this readme.txt

colorfului/ColorfulUI.php 92% from 13 tests

"ColorfulUI" version 0.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("colorfului.php" instead of "ColorfulUI.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
No dangerous file extensions were detected128 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP14339128

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.48
Average class complexity12.00
▷ Minimum class complexity12.00
▷ Maximum class complexity12.00
Average method complexity4.67
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods3
▷ Static methods00.00%
▷ Public methods3100.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

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG files were detected