83% uvc-digital-clock

Code Review | UVC digital clock

WordPress plugin UVC digital clock scored 83% from 54 tests.

About plugin

  • Plugin page: uvc-digital-clock
  • Plugin version: 1.0
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-4.7
  • WordPress version: 6.3.1
  • First release: Feb 11, 2018
  • Latest release: Feb 13, 2018
  • Number of updates: 30
  • Update frequency: every 0.1 days
  • Top authors: olegthehamster (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active / 1,663 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

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

An overview of server-side resources used by UVC digital clock
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0138.18 ▼4.72
Dashboard /wp-admin3.31 ▲0.0143.26 ▼9.80
Posts /wp-admin/edit.php3.37 ▲0.0147.00 ▲1.29
Add New Post /wp-admin/post-new.php5.90 ▲0.0185.48 ▼13.40
Media Library /wp-admin/upload.php3.24 ▲0.0133.64 ▲1.98

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

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

Browser metrics Passed 4 tests

Checking browser requirements for UVC digital clock
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲4313.22 ▼1.581.86 ▼0.1144.09 ▼2.14
Dashboard /wp-admin2,206 ▲184.86 ▼1.02111.32 ▼11.7843.00 ▼4.82
Posts /wp-admin/edit.php2,089 ▼01.99 ▼0.0039.04 ▲2.4633.03 ▼0.91
Add New Post /wp-admin/post-new.php1,533 ▲1423.46 ▲0.40647.59 ▼37.4747.03 ▼11.16
Media Library /wp-admin/upload.php1,391 ▲34.26 ▲0.0695.89 ▼13.0240.13 ▼7.89

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
Please fix the following items
  • Zombie WordPress options were found after uninstall: 7 options
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_uvcd_clock
    • theysaidso_admin_options
    • can_compress_scripts

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)
Good news, no errors were detected

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 items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/uvc-digital-clock/dclock.php:9

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 81% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that require attention:
  • Screenshots: A description for screenshot #1 is required in uvc-digital-clock/assets to your readme.txt
  • Contributors: No tags were detected
  • Contributors: Plugin contributors not specified
The official readme.txt is a good inspiration

uvc-digital-clock/dclock.php 92% from 13 tests

The main PHP script in "UVC digital clock" version 1.0 is automatically included on every request by WordPress
It is important to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("uvc-digital-clock.php" instead of "dclock.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
There were no executable files found in this plugin86 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1541686

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.08
Average class complexity2.00
▷ Minimum class complexity2.00
▷ Maximum class complexity2.00
Average method complexity1.25
▷ Minimum method complexity1.00
▷ Maximum method complexity2.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%
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

All PNG images should be compressed to minimize bandwidth usage for end users
4 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
003.png3.15KB2.15KB▼ 31.83%
001.png3.10KB2.08KB▼ 32.90%
004.png3.40KB2.26KB▼ 33.60%
002.png3.51KB2.31KB▼ 34.04%