90% universal-clocks

Code Review | Universal Clocks

WordPress plugin Universal Clocks scored90%from 54 tests.

About plugin

  • Plugin page: universal-clocks
  • Plugin version: 1.2.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.3
  • WordPress version: 6.3.1
  • First release: Mar 2, 2021
  • Latest release: Aug 10, 2023
  • Number of updates: 14
  • Update frequency: every 63.6 days
  • Top authors: PressTigers (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /2,386 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.25MB] [CPU: ▼5.87ms] Passed 4 tests

An overview of server-side resources used by Universal Clocks
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.1237.68 ▼3.01
Dashboard /wp-admin3.61 ▲0.2646.79 ▼13.69
Posts /wp-admin/edit.php3.72 ▲0.3751.23 ▼1.19
Add New Post /wp-admin/post-new.php6.21 ▲0.3393.42 ▼4.99
Media Library /wp-admin/upload.php3.53 ▲0.3034.65 ▼1.77
Settings /wp-admin/admin.php?page=universal-clocks-settings3.5033.04
All Clocks /wp-admin/edit.php?post_type=universal_clocks3.5733.77

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Universal Clocks
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,953 ▲19213.67 ▼0.968.75 ▲7.1769.79 ▲30.50
Dashboard /wp-admin2,250 ▲795.85 ▲0.2985.85 ▼3.0341.20 ▲1.37
Posts /wp-admin/edit.php2,154 ▲542.30 ▲0.2940.79 ▲0.5034.88 ▼5.77
Add New Post /wp-admin/post-new.php1,577 ▲4923.48 ▲0.42589.17 ▼76.4735.21 ▼28.23
Media Library /wp-admin/upload.php1,452 ▲524.50 ▲0.26104.89 ▲5.6745.96 ▲2.27
Settings /wp-admin/admin.php?page=universal-clocks-settings8771.8729.2435.84
All Clocks /wp-admin/edit.php?post_type=universal_clocks1,1392.3632.3525.26

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP Passed 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

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

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
4 plugin tags: watches, digital clock, universal clock, analog clock

universal-clocks/universal-clocks.php Passed 13 tests

The main PHP script in "Universal Clocks" version 1.2.0 is automatically included on every request by WordPress
58 characters long description:
A plugin to show multiple clocks with different time zones

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected2,374 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
PHP132457051,645
JavaScript382207492
CSS3135237

PHP code Passed 2 tests

Analyzing 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.27
Average class complexity9.73
▷ Minimum class complexity1.00
▷ Maximum class complexity52.00
Average method complexity3.29
▷ Minimum method complexity1.00
▷ Maximum method complexity30.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes11
▷ Abstract classes00.00%
▷ Concrete classes11100.00%
▷ Final classes00.00%
Methods42
▷ Static methods49.52%
▷ Public methods3788.10%
▷ Protected methods00.00%
▷ Private methods511.90%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
78 compressed PNG files occupy 0.37MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/images/singleclock.png9.04KB8.88KB▼ 1.86%
admin/images/circle-9.png4.95KB1.91KB▼ 61.42%
public/clock-templates/size-200/images/jcgmt-3-clock_hour.png0.75KB0.73KB▼ 3.00%
public/clock-templates/size-200/images/jcgmt-9-clock_face.png1.10KB1.12KB0.00%
public/clock-templates/size-200/images/jcgmt-10-clock_hour.png1.14KB1.14KB0.09%