84% color-schemes-roulette

Code Review | Color Schemes Roulette

WordPress plugin Color Schemes Roulette scored84%from 54 tests.

About plugin

  • Plugin page: color-schemes-rou...
  • Plugin version: 0.7
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-4.0
  • WordPress version: 6.3.1
  • First release: Dec 14, 2013
  • Latest release: Sep 5, 2014
  • Number of updates: 9
  • Update frequency: every 29.6 days
  • Top authors: kovshenin (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,833 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

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

A check of server-side resources used by Color Schemes Roulette
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0140.07 ▼3.07
Dashboard /wp-admin3.31 ▲0.0146.00 ▲1.61
Posts /wp-admin/edit.php3.36 ▲0.0147.01 ▲2.82
Add New Post /wp-admin/post-new.php5.89 ▲0.01103.60 ▲16.19
Media Library /wp-admin/upload.php3.23 ▲0.0032.92 ▼4.13

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Color Schemes Roulette
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.26 ▼1.411.76 ▲0.0543.83 ▼0.53
Dashboard /wp-admin2,206 ▲154.84 ▼0.07106.44 ▲1.3941.00 ▲0.98
Posts /wp-admin/edit.php2,086 ▼32.02 ▲0.0135.30 ▼2.2433.49 ▼0.50
Add New Post /wp-admin/post-new.php1,533 ▲423.40 ▲4.99643.04 ▲7.3163.96 ▲13.58
Media Library /wp-admin/upload.php1,391 ▼04.21 ▲0.01105.63 ▲3.4245.93 ▲2.77

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

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
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/color-schemes-roulette/color-schemes-roulette.php:26

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 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
3 plugin tags: dashboard, fun, admin

color-schemes-roulette/color-schemes-roulette.php Passed 13 tests

The principal PHP file in "Color Schemes Roulette" v. 0.7 is loaded by WordPress automatically on each request
70 characters long description:
Randomly changes the admin color scheme every time you publish a post.

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
Success! There were no dangerous files found in this plugin14 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP15714

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.75
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