84% localize-time

Code Review | Localize Time

WordPress plugin Localize Time scored84%from 54 tests.

About plugin

  • Plugin page: localize-time
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.9.1
  • WordPress version: 6.3.1
  • First release: May 30, 2014
  • Latest release: May 30, 2014
  • Number of updates: 6
  • Update frequency: every 123.7 days
  • Top authors: JBChristy (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

70+ active /2,225 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

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

Server-side resources used by Localize Time
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0241.90 ▼2.29
Dashboard /wp-admin3.32 ▲0.0256.06 ▲3.92
Posts /wp-admin/edit.php3.37 ▲0.0249.34 ▼0.41
Add New Post /wp-admin/post-new.php5.90 ▲0.0296.66 ▲7.09
Media Library /wp-admin/upload.php3.24 ▲0.0138.91 ▼1.31

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Localize Time
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲2913.21 ▼1.101.90 ▼0.3245.90 ▼3.12
Dashboard /wp-admin2,203 ▲125.86 ▲0.97108.95 ▲0.0939.98 ▼5.48
Posts /wp-admin/edit.php2,086 ▼32.01 ▲0.0138.87 ▼1.2535.22 ▲0.66
Add New Post /wp-admin/post-new.php1,519 ▲523.47 ▲5.79679.63 ▲22.3854.52 ▲4.42
Media Library /wp-admin/upload.php1,388 ▼04.29 ▲0.0599.91 ▼13.3649.91 ▲1.60

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
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments

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 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/localize-time/localize-time.php:54

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: Add images for these screenshots: #1 (Examples of entering the shortcode.), #2 (What the shortcode displays in the US Pacific timezone.)
You can look at the official readme.txt

localize-time/localize-time.php Passed 13 tests

"Localize Time" version 1.0.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
75 characters long description:
Provide a shortcode to allow displaying a time in the user's local timezone

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
No dangerous file extensions were detected80 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP2195951
JavaScript12529

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity7.00
▷ Minimum class complexity7.00
▷ Maximum class complexity7.00
Average method complexity3.00
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods3
▷ Static methods133.33%
▷ Public methods266.67%
▷ Protected methods133.33%
▷ 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

Often times overlooked, PNG files can occupy unnecessary space in your plugin
2 PNG files occupy 0.12MB with 0.08MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png52.93KB16.75KB▼ 68.37%
screenshot-2.png71.29KB25.39KB▼ 64.38%