84% me-localtime

Code Review | Local Time

WordPress plugin Local Time scored84%from 54 tests.

About plugin

  • Plugin page: me-localtime
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.0.1
  • WordPress version: 6.3.1
  • First release: Jul 22, 2022
  • Latest release: Jul 22, 2022
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: michaelespiritu (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,081 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

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

This is a short check of server-side resources used by Local Time
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0141.55 ▼2.37
Dashboard /wp-admin3.31 ▲0.0148.37 ▼1.77
Posts /wp-admin/edit.php3.36 ▲0.0145.13 ▼7.00
Add New Post /wp-admin/post-new.php5.91 ▲0.0384.37 ▼10.00
Media Library /wp-admin/upload.php3.24 ▲0.0136.95 ▼0.28

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Local Time
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,891 ▲13013.41 ▼1.319.09 ▲7.3645.71 ▼0.73
Dashboard /wp-admin2,208 ▲285.63 ▼0.0485.63 ▼17.5140.57 ▼1.55
Posts /wp-admin/edit.php2,113 ▲162.00 ▼0.0336.81 ▲2.4234.36 ▼4.35
Add New Post /wp-admin/post-new.php1,543 ▲1718.32 ▼4.61611.25 ▼40.9864.77 ▲7.66
Media Library /wp-admin/upload.php1,407 ▲74.12 ▼0.01100.98 ▼13.7741.49 ▼5.68

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

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
  • 3× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/me-localtime/includes/get-melt-time.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/me-localtime/includes/get-melt-enqueue.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/me-localtime/includes/get-melt-admin-bar.php:8

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
2 plugin tags: local time, time

me-localtime/localtime.php 92% from 13 tests

The entry point to "Local Time" version 1.0 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("me-localtime.php" instead of "localtime.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
No dangerous file extensions were detected111 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP554969
JavaScript19025
Markdown16017

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity2.33
▷ Minimum class complexity1.00
▷ Maximum class complexity5.00
Average method complexity1.67
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods6100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There are no PNG files in this plugin