10% the-colour-clock

Code Review | The Colour Clock

WordPress plugin The Colour Clock scored10%from 54 tests.

About plugin

  • Plugin page: the-colour-clock
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 2.8.0-4.3
  • WordPress version: 6.3.1
  • First release: Feb 10, 2015
  • Latest release: Aug 19, 2015
  • Number of updates: 10
  • Update frequency: every 19.0 days
  • Top authors: Piotr Pesta (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,287 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
It is recommended to fix the following installer errors
  • This plugin did not install gracefully
    • > Deprecated in wp-content/plugins/the-colour-clock/hex-background-clock.php+19
    Methods with the same name as their class will not be constructors in a future version of PHP; hex_background_clock has a deprecated constructor

Server metrics [RAM: ▼1.92MB] [CPU: ▼51.53ms] Passed 4 tests

An overview of server-side resources used by The Colour Clock
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.06 ▼1.404.79 ▼38.86
Dashboard /wp-admin2.08 ▼1.2210.87 ▼38.40
Posts /wp-admin/edit.php2.08 ▼1.276.18 ▼39.18
Add New Post /wp-admin/post-new.php2.08 ▼3.805.35 ▼89.69
Media Library /wp-admin/upload.php2.08 ▼1.145.41 ▼28.35

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 4 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
widget_hex_background_clock
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by The Colour Clock
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,802 ▲4513.18 ▼1.464.64 ▲2.7842.23 ▼4.17
Dashboard /wp-admin2,206 ▲215.91 ▲0.05111.32 ▼6.7243.70 ▲0.25
Posts /wp-admin/edit.php2,089 ▼01.98 ▼0.0339.56 ▲2.0134.32 ▼0.55
Add New Post /wp-admin/post-new.php1,547 ▲3318.25 ▲0.57607.63 ▼74.2461.12 ▲12.14
Media Library /wp-admin/upload.php1,388 ▼04.18 ▲0.01101.34 ▼0.9344.12 ▼2.95

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% 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
  • Uninstall procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/the-colour-clock/hex-background-clock.php+19
    Methods with the same name as their class will not be constructors in a future version of PHP; hex_background_clock has a deprecated constructor
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
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 register_uninstall_hook() in wp-content/plugins/the-colour-clock/hex-background-clock.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
7 plugin tags: wallpaper, hex, background changer, hexadecimal, colour...

the-colour-clock/hex-background-clock.php 85% from 13 tests

The entry point to "The Colour Clock" version 1.0.2 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 219 characters long)
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("the-colour-clock.php" instead of "hex-background-clock.php")

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
There were no executable files found in this plugin98 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP2391891
CSS1007

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.07
Average class complexity3.00
▷ Minimum class complexity3.00
▷ Maximum class complexity3.00
Average method complexity1.50
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions150.00%
▷ Anonymous functions150.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
PNG images were not found in this plugin