84% uk-tides

Code Review | UK tides - heights and times

WordPress plugin UK tides - heights and times scored84%from 54 tests.

About plugin

  • Plugin page: uk-tides
  • Plugin version: 3.2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0+
  • WordPress version: 6.3.1
  • First release: Apr 6, 2012
  • Latest release: Nov 3, 2023
  • Number of updates: 56
  • Update frequency: every 75.6 days
  • Top authors: bobbingwide (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /6,954 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
Installer ran successfully

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

This is a short check of server-side resources used by UK tides - heights and times
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.76 ▲0.3036.81 ▼0.61
Dashboard /wp-admin3.59 ▲0.2547.45 ▼12.88
Posts /wp-admin/edit.php3.64 ▲0.2852.66 ▲6.54
Add New Post /wp-admin/post-new.php6.11 ▲0.2281.19 ▼13.00
Media Library /wp-admin/upload.php3.45 ▲0.2241.17 ▲5.03

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

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

Browser metrics Passed 4 tests

UK tides - heights and times: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,790 ▲4314.28 ▼0.281.76 ▲0.1138.58 ▼2.56
Dashboard /wp-admin2,195 ▲215.58 ▼0.0885.88 ▼10.6242.25 ▲0.65
Posts /wp-admin/edit.php2,100 ▼01.97 ▲0.0337.42 ▼7.3534.89 ▼2.74
Add New Post /wp-admin/post-new.php6,362 ▲4,83627.74 ▲4.70908.70 ▲204.6268.18 ▲14.69
Media Library /wp-admin/upload.php1,394 ▼64.16 ▼0.0297.00 ▼13.5044.35 ▼1.04

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for 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× 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/uk-tides/uk-tides.php:49
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/uk-tides/libs/oik-shortcodes.php:485

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 93% from 29 tests

readme.txt 88% from 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
These attributes need your attention:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Example UK tides block - for Chichester Harbour (Entrance) from tidetimes.org.uk), #2 (Sample output for Portsmouth, Hants - from tidetimes.org.uk), #3 (Sample output for Portsmouth, Hants - from tidetimes.co.uk)
  • Tested up to: Invalid version format
You can take inspiration from this readme.txt

uk-tides/uk-tides.php Passed 13 tests

Analyzing the main PHP file in "UK tides - heights and times" version 3.2.0
69 characters long description:
uk-tides block and [bw_tides] shortcode for UK tide times and heights

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
Everything looks great! No dangerous files found in this plugin4,441 lines of code in 23 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript64172792,173
PHP123852,1072,066
PO File2241892
JSON20089
Markdown120021

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity15.00
▷ Minimum class complexity14.00
▷ Maximum class complexity16.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods28
▷ Static methods2796.43%
▷ Public methods28100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions179
▷ Named functions179100.00%
▷ Anonymous functions00.00%
Constants21
▷ Global constants21100.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
2 PNG files occupy 0.03MB with 0.02MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-3.png16.60KB6.33KB▼ 61.84%
screenshot-2.png17.16KB6.44KB▼ 62.45%