83% digital-clock

Code Review | Digital Clock

WordPress plugin Digital Clock scored83%from 54 tests.

About plugin

  • Plugin page: digital-clock
  • Plugin version: 1.1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.1
  • WordPress version: 6.3.1
  • First release: Mar 26, 2019
  • Latest release: Nov 10, 2022
  • Number of updates: 49
  • Update frequency: every 27.0 days
  • Top authors: mhkanon (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

500+ active /9,579 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼6.56ms] Passed 4 tests

Server-side resources used by Digital Clock
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0441.07 ▼1.22
Dashboard /wp-admin3.34 ▲0.0351.46 ▲0.01
Posts /wp-admin/edit.php3.39 ▲0.0346.60 ▼0.72
Add New Post /wp-admin/post-new.php5.92 ▲0.0383.71 ▼24.24
Media Library /wp-admin/upload.php3.26 ▲0.0335.91 ▼0.04

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Digital Clock
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,180 ▲43413.81 ▼0.5711.06 ▲9.1941.95 ▼2.39
Dashboard /wp-admin2,215 ▲244.84 ▼1.05110.35 ▲11.1541.69 ▼1.80
Posts /wp-admin/edit.php2,101 ▲122.00 ▼0.0337.63 ▼3.0832.84 ▼2.55
Add New Post /wp-admin/post-new.php1,545 ▲323.05 ▲4.78640.26 ▲8.0859.33 ▲2.27
Media Library /wp-admin/upload.php1,400 ▲94.18 ▼0.0294.98 ▲0.2642.35 ▲0.32

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
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_dgc_register
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments

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
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 items
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/digital-clock/digital-clock.php:24
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/digital-clock/dgc_menu.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need to be fixed:
  • Requires php: The plugin version is formatted incorrectly
  • Screenshots: Please add descriptions for these screenshots #4, #5, #6, #7, #8, #9 in digital-clock/assets to your readme.txt
You can take inspiration from this readme.txt

digital-clock/digital-clock.php 85% from 13 tests

Analyzing the main PHP file in "Digital Clock" version 1.1.3
Please take the time to fix the following:
  • Text Domain: Please use dashes and lowercase characters for text domains
  • Domain Path: The domain path points to a folder that does not exist ("/languages")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin657 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
CSS19148273
PHP27519168
SVG100146
JavaScript2444070

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity9.00
▷ Minimum class complexity9.00
▷ Maximum class complexity9.00
Average method complexity2.60
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods00.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions6
▷ Named functions583.33%
▷ Anonymous functions116.67%
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
PNG images were not found in this plugin