83% use-clients-time-zone

Code Review | Use Client's Time Zone

WordPress plugin Use Client's Time Zone scored83%from 54 tests.

About plugin

  • Plugin page: use-clients-time-...
  • Plugin version: 1.1.5
  • PHP version: 7.4.16
  • WordPress compatibility: 1.5-6.3.2
  • WordPress version: 6.3.1
  • First release: Sep 20, 2012
  • Latest release: Oct 13, 2023
  • Number of updates: 31
  • Update frequency: every 130.4 days
  • Top authors: drmikegreen (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

200+ active /7,983 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.02MB] [CPU: ▼9.69ms] Passed 4 tests

Server-side resources used by Use Client's Time Zone
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0238.31 ▼2.37
Dashboard /wp-admin3.34 ▲0.0349.47 ▼2.10
Posts /wp-admin/edit.php3.39 ▲0.0349.87 ▼5.14
Add New Post /wp-admin/post-new.php5.92 ▲0.0383.66 ▼29.16
Media Library /wp-admin/upload.php3.26 ▲0.0339.76 ▲6.49
Use Client's Time Zone /wp-admin/options-general.php?page=use_clients_timezone_plugin3.2331.75

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 24 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
db_upgraded
can_compress_scripts
use_clients_timezone_fallback_timezone
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Use Client's Time Zone
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,059 ▲29814.03 ▼0.5915.60 ▲13.8338.43 ▼8.41
Dashboard /wp-admin2,196 ▲165.51 ▼0.1682.91 ▼12.1241.86 ▲3.14
Posts /wp-admin/edit.php2,104 ▲42.02 ▲0.0242.06 ▼0.8236.62 ▲0.09
Add New Post /wp-admin/post-new.php1,538 ▲1018.34 ▼4.73659.80 ▼40.2670.38 ▲12.57
Media Library /wp-admin/upload.php1,407 ▲74.19 ▲0.0196.82 ▼13.5340.59 ▼6.13
Use Client's Time Zone /wp-admin/options-general.php?page=use_clients_timezone_plugin8281.9923.9534.50

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • use_clients_timezone_fallback_timezone
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
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
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 plugins_url() in wp-content/plugins/use-clients-time-zone/use-clients-timezone-class.inc.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need your attention:
  • Screenshots: Add an image for screenshot #1 (Settings page.)
You can look at the official readme.txt

use-clients-time-zone/use-clients-timezone.php 85% from 13 tests

The primary PHP file in "Use Client's Time Zone" version 1.1.5 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("use-clients-time-zone.php" instead of "use-clients-timezone.php")
  • Description: Please keep the plugin description shorter than 140 characters (currently 970 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin897 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript58947472
Markdown31020175
JSON400114
PHP3233789
HTML20037
YAML10010

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity6.00
▷ Minimum class complexity6.00
▷ Maximum class complexity6.00
Average method complexity1.62
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
1 PNG file occupies 0.06MB with 0.04MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png59.84KB23.43KB▼ 60.85%