10% local-time-clock

Code Review | Local Time Clock

WordPress plugin Local Time Clock scored10%from 54 tests.

About plugin

  • Plugin page: local-time-clock
  • Plugin version: 1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 2.8-5.6.1
  • WordPress version: 6.3.1
  • First release: Feb 17, 2010
  • Latest release: Feb 17, 2021
  • Number of updates: 69
  • Update frequency: every 70.2 days
  • Top authors: enclick (100%)

Code review

54 tests

User reviews

9 reviews

Install metrics

2,000+ active /112,566 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
These installer errors require your attention
  • The plugin did not install without errors
    • > Deprecated in wp-content/plugins/local-time-clock/local_time_clock.php+39
    Methods with the same name as their class will not be constructors in a future version of PHP; local_time_clock has a deprecated constructor

Server metrics [RAM: ▼1.82MB] [CPU: ▼55.00ms] Passed 4 tests

Analyzing server-side resources used by Local Time Clock
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.17 ▼1.295.12 ▼39.40
Dashboard /wp-admin2.19 ▼1.117.22 ▼44.80
Posts /wp-admin/edit.php2.19 ▼1.177.52 ▼39.16
Add New Post /wp-admin/post-new.php2.19 ▼3.705.53 ▼96.64
Media Library /wp-admin/upload.php2.19 ▼1.046.62 ▼30.21

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 14 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
can_compress_scripts
widget_recent-posts
widget_local_time_clock
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Local Time Clock
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.34 ▼0.011.82 ▼0.0644.06 ▼0.34
Dashboard /wp-admin2,195 ▲215.54 ▼0.0397.75 ▼7.1043.49 ▼1.07
Posts /wp-admin/edit.php2,097 ▼31.97 ▼0.0137.26 ▲2.8836.05 ▼2.79
Add New Post /wp-admin/post-new.php1,528 ▲223.06 ▼0.10674.46 ▲30.2454.38 ▲10.30
Media Library /wp-admin/upload.php1,397 ▼64.24 ▲0.03109.32 ▲7.7449.41 ▲6.03

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • This plugin did not uninstall without warnings or errors
    • > Deprecated in wp-content/plugins/local-time-clock/local_time_clock.php+39
    Methods with the same name as their class will not be constructors in a future version of PHP; local_time_clock has a deprecated constructor
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • widget_local_time_clock

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
  • 1× 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/local-time-clock/local_time_clock.php:20

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Please fix the following attributes:
  • Screenshots: These screenshots require images: #1 (Digital Basic clock), #2 (Analog Basic clock), #3 (Analog Flag clock), #4 (Analog World Globe clock), #5 (Analog Shiny 3D clock), #6 (Digital Time and Date clock), #7 (Digital Flip-over clock), #8 (Digital Stick-it Note clock), #9 (Admin Panel)
  • Tags: Please reduce the number of tags, currently 14 tag instead of maximum 10
You can take inspiration from this readme.txt

local-time-clock/local_time_clock.php 92% from 13 tests

"Local Time Clock" version 1.3's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("local-time-clock.php" instead of "local_time_clock.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected452 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP2189108452

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity23.00
▷ Minimum class complexity23.00
▷ Maximum class complexity23.00
Average method complexity6.50
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions9
▷ Named functions9100.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
PNG images were not found in this plugin