84% timezonecalculator

Code Review | TimeZoneCalculator

WordPress plugin TimeZoneCalculator scored84%from 54 tests.

About plugin

  • Plugin page: timezonecalculator
  • Plugin version: 3.37
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-4.9
  • WordPress version: 6.3.1
  • First release: Apr 6, 2006
  • Latest release: Nov 9, 2017
  • Number of updates: 113
  • Update frequency: every 37.5 days
  • Top authors: neoxx (73.45%)xxxxxneoxxxxx (27.43%)matt (1.77%)

Code review

54 tests

User reviews

3 reviews

Install metrics

400+ active /44,543 total downloads


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.57MB] [CPU: ▼3.01ms] Passed 4 tests

Server-side resources used by TimeZoneCalculator
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /4.03 ▲0.5746.48 ▲4.28
Dashboard /wp-admin3.92 ▲0.6252.04 ▲0.64
Posts /wp-admin/edit.php3.97 ▲0.6254.06 ▼1.75
Add New Post /wp-admin/post-new.php6.44 ▲0.5591.94 ▼13.98
Media Library /wp-admin/upload.php3.78 ▲0.5639.28 ▲3.04
TimeZoneCalculator /wp-admin/tools.php?page=timezonecalculator_calculator3.9243.38
TimeZoneCalculator /wp-admin/options-general.php?page=timezonecalculator3.8438.95

Server storage [IO: ▲0.34MB] [DB: ▲0.03MB] Passed 3 tests

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 44 new files
Database: no new tables, 8 new options
New WordPress options

Browser metrics Passed 4 tests

Checking browser requirements for TimeZoneCalculator
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,963 ▲21713.66 ▼0.6410.45 ▲8.7546.16 ▲2.33
Dashboard /wp-admin2,236 ▲454.88 ▼1.00115.78 ▼0.0545.18 ▲4.41
Posts /wp-admin/edit.php2,122 ▲332.03 ▲0.0340.30 ▼1.3034.26 ▼1.34
Add New Post /wp-admin/post-new.php1,530 ▼1417.63 ▼0.60625.60 ▼10.1457.23 ▼0.96
Media Library /wp-admin/upload.php1,421 ▲424.21 ▼0.0299.11 ▼1.0341.23 ▼2.84
TimeZoneCalculator /wp-admin/tools.php?page=timezonecalculator_calculator1,5082.6957.5049.89
TimeZoneCalculator /wp-admin/options-general.php?page=timezonecalculator3,4892.5750.2236.99

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please take a closer look at the following
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_die() in wp-content/plugins/timezonecalculator/uninstall.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/timezonecalculator/timezonecalculator.php:480

User-side errors Passed 1 test

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


Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that need to be fixed:
  • Tags: Too many tags (18 tag instead of maximum 10); only the first 5 tags are used in your directory listing
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (This screenshot shows the Settings/TimeZoneCalculator Tab with the Selection GUI Section in the Admin Menu.), #2 (This picture presents the Preview Section of the TimeZoneCalculator Tab in the Admin Menu.), #3 (This screenshot illustrates the clock in the WordPress Admin Bar. - The date/time and display format can be customized.), #4 (The last picture shows the Calculator Section in the Tools Menu on a mobile phone.)
You can look at the official readme.txt

timezonecalculator/timezonecalculator.php Passed 13 tests

The entry point to "TimeZoneCalculator" version 3.37 is a PHP file that has certain tags in its header comment area
118 characters long description:
Calculates, displays and automatically updates times and dates in different timezones with respect to daylight saving.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Good job! No executable or dangerous file extensions detected3,518 lines of code in 38 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity109.67
▷ Minimum class complexity7.00
▷ Maximum class complexity296.00
Average method complexity3.09
▷ Minimum method complexity1.00
▷ Maximum method complexity41.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods8957.05%
▷ Protected methods00.00%
▷ Private methods6742.95%
▷ Named functions00.00%
▷ Anonymous functions00.00%
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
4 PNG files occupy 0.04MB with 0.02MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png8.73KB4.93KB▼ 43.48%
screenshot-2.png16.83KB7.57KB▼ 55.05%
screenshot-4.png15.01KB8.33KB▼ 44.51%
screenshot-3.png2.82KB2.65KB▼ 5.79%