94% world-time

Code Review | World Time

WordPress plugin World Time scored 94% from 54 tests.

About plugin

  • Plugin page: world-time
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.9.1
  • WordPress version: 5.8.1
  • First release: Jun 29, 2014
  • Latest release: Jun 29, 2014
  • Number of updates: 12
  • Update frequency: N/A
  • Top authors: jillporterfa (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

10+ active / 1,197 total downloads

Benchmarks

Plugin footprint Passed 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.02MB] [CPU: ▼144.72ms] Passed 4 tests

A check of server-side resources used by World Time
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.86 ▲0.1433.00 ▲12.51
Dashboard /wp-admin3.08 ▲0.0342.63 ▼6.08
Posts /wp-admin/edit.php3.13 ▲0.0343.02 ▼3.36
Add New Post /wp-admin/post-new.php5.44 ▲0.0180.56 ▼564.63
Media Library /wp-admin/upload.php3.02 ▲0.0227.88 ▼4.80
World Time /wp-admin/options-general.php?page=wt-settings3.1527.08

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 6 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for World Time
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,822 ▲22616.25 ▲0.7912.01 ▲2.4858.63 ▲10.40
Dashboard /wp-admin2,978 ▲445.87 ▼0.05135.69 ▼17.60114.79 ▼0.91
Posts /wp-admin/edit.php2,744 ▲52.69 ▼0.0163.54 ▼4.6984.00 ▲3.47
Add New Post /wp-admin/post-new.php1,503 ▼16718.60 ▼0.63350.53 ▼25.51106.50 ▼8.43
Media Library /wp-admin/upload.php1,812 ▲55.00 ▼0.01152.12 ▼9.28128.29 ▲8.42
World Time /wp-admin/options-general.php?page=wt-settings9,6412.0955.8487.63

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Uninstaller ran successfully

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 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/world-time/src/wt-main.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/world-time/tpl/admin.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
2 plugin tags: world time, timezones

world-time/world-time.php 92% from 13 tests

"World Time" version 1.0.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please take the time to fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 309 characters long)

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
There were no executable files found in this plugin151 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP3127117
JavaScript11327
CSS1107

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.16
Average class complexity8.00
▷ Minimum class complexity8.00
▷ Maximum class complexity8.00
Average method complexity1.88
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods8
▷ Static methods112.50%
▷ Public methods787.50%
▷ Protected methods112.50%
▷ 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

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There were not PNG files found in your plugin