84% jclocksgmt-wp

Code Review | jClocksGMT World Clocks

WordPress plugin jClocksGMT World Clocks scored84%from 54 tests.

About plugin

  • Plugin page: jclocksgmt-wp
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.5.2
  • WordPress version: 6.3.1
  • First release: Apr 27, 2016
  • Latest release: May 20, 2016
  • Number of updates: 14
  • Update frequency: every 1.6 days
  • Top authors: kingkode (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

200+ active /4,760 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

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

An overview of server-side resources used by jClocksGMT World Clocks
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0139.48 ▼0.34
Dashboard /wp-admin3.32 ▲0.0148.08 ▼1.76
Posts /wp-admin/edit.php3.37 ▲0.0148.64 ▼1.87
Add New Post /wp-admin/post-new.php5.90 ▲0.0188.96 ▼12.51
Media Library /wp-admin/upload.php3.24 ▲0.0141.65 ▲7.99

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 28 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts
widget_recent-posts
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for jClocksGMT World Clocks
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.25 ▼0.371.93 ▲0.3044.08 ▼0.65
Dashboard /wp-admin2,198 ▲185.61 ▲0.0288.52 ▼1.0541.56 ▼2.90
Posts /wp-admin/edit.php2,100 ▼31.99 ▼0.0039.66 ▼0.1640.21 ▲2.03
Add New Post /wp-admin/post-new.php1,531 ▲223.15 ▼0.14666.26 ▼1.6551.90 ▼12.92
Media Library /wp-admin/upload.php1,397 ▼04.23 ▲0.06103.41 ▼0.1845.58 ▲4.95

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts

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 | 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
Please fix the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/jclocksgmt-wp/jclocksgmt-wp.php:52

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
4 plugin tags: world clock, timezone, time, clock

jclocksgmt-wp/jclocksgmt-wp.php Passed 13 tests

The main PHP file in "jClocksGMT World Clocks" ver. 1.0.2 adds more information about the plugin and also serves as the entry point for this plugin
56 characters long description:
Analog and digital clock(s) plugin based on GMT offsets.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected499 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript272176418
PHP1182342
CSS11039

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.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
22 PNG files occupy 0.07MB with 0.04MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/jcgmt-3-clock_face.png10.13KB5.72KB▼ 43.50%
images/jcgmt-3-clock_hour.png1.19KB0.20KB▼ 83.50%
images/favicon.png7.65KB8.74KB0.00%
images/jcgmt-4-clock_hour.png1.19KB0.23KB▼ 80.97%
images/jcgmt-1-clock_min.png1.06KB0.11KB▼ 89.69%