72% color-manager

Code Review | Color Manager

WordPress plugin Color Manager scored72%from 54 tests.

About plugin

  • Plugin page: color-manager
  • Plugin version: 0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4-3.4.2
  • WordPress version: 6.3.1
  • First release: Aug 11, 2011
  • Latest release: Sep 24, 2012
  • Number of updates: 20
  • Update frequency: every 20.5 days
  • Top authors: shazdeh (100%)

Code review

54 tests

User reviews

1 review

Install metrics

60+ active /9,031 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

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

A check of server-side resources used by Color Manager
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0239.15 ▼0.59
Dashboard /wp-admin3.33 ▲0.0250.52 ▼2.42
Posts /wp-admin/edit.php3.38 ▲0.0247.62 ▼7.38
Add New Post /wp-admin/post-new.php5.91 ▲0.0297.77 ▼2.88
Media Library /wp-admin/upload.php3.25 ▲0.0237.24 ▲0.91
Color Manager /wp-admin/themes.php?page=color-manager3.2028.00

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for Color Manager
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5813.31 ▼1.291.78 ▼0.4041.71 ▼0.21
Dashboard /wp-admin2,213 ▲224.84 ▼0.02111.82 ▲4.2037.99 ▼7.88
Posts /wp-admin/edit.php2,093 ▲42.04 ▼0.0239.84 ▼3.9233.78 ▼2.15
Add New Post /wp-admin/post-new.php1,536 ▲323.15 ▼0.11669.63 ▲53.5959.42 ▲7.16
Media Library /wp-admin/upload.php1,392 ▲44.20 ▼0.04116.34 ▲16.9751.19 ▲5.90
Color Manager /wp-admin/themes.php?page=color-manager8101.7632.6925.39

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Smoke test failed, please fix the following
    • > GET request to /wp-admin/themes.php?page=color-manager
    • > Warning in wp-content/plugins/color-manager/init.php+68
    count(): Parameter must be an array or an object that implements Countable
    • > GET request to /wp-admin/themes.php?page=color-manager
    • > User deprecated in wp-includes/functions.php+5463
    Function screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/themes.php?page=color-manager
    • > User deprecated in wp-includes/functions.php+5463
    Function get_screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/themes.php?page=color-manager
    • > Notice in wp-content/plugins/color-manager/views/manager.php+24
    Trying to access array offset on value of type bool

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
  • 2× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/color-manager/views/manager.php
    • > /wp-content/plugins/color-manager/init.php

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Please fix the following browser errors
    • > GET request to /wp-admin/themes.php?page=color-manager
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,farbtastic&ver=6.3.1 1:28609 "jQuery.Deferred exception: $(...).live is not a function" "TypeError: $(...).live is not a function\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/color-manager/js/admin.js?ver=0.2:2:19)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,farbtastic&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,farbtastic&ver=6.3.1:2:27292)" undefined
    • > GET request to /wp-admin/themes.php?page=color-manager
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,farbtastic&ver=6.3.1 1:28721 Uncaught TypeError: $(...).live is not a function

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
3 plugin tags: customizer, theme, colors

color-manager/init.php 92% from 13 tests

Analyzing the main PHP file in "Color Manager" version 0.2
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("color-manager.php" instead of "init.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 plugin125 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP2152099
JavaScript11026

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity7.00
▷ Minimum class complexity7.00
▷ Maximum class complexity7.00
Average method complexity1.75
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.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
No PNG files were detected