77% waiting-for-the-tide-uk

Code Review | Waiting for the tide (UK)

WordPress plugin Waiting for the tide (UK) scored77%from 54 tests.

About plugin

  • Plugin page: waiting-for-the-t...
  • Plugin version: 1.0.7
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-6.1
  • WordPress version: 6.3.1
  • First release: Sep 30, 2022
  • Latest release: Oct 31, 2022
  • Number of updates: 7
  • Update frequency: every 4.4 days
  • Top authors: waitingforthetide (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /535 total downloads

Benchmarks

Plugin footprint 83% from 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.83MB] [CPU: ▲0.52ms] Passed 4 tests

Analyzing server-side resources used by Waiting for the tide (UK)
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /4.32 ▲0.8644.30 ▲3.64
Dashboard /wp-admin4.17 ▲0.8651.10 ▲3.32
Posts /wp-admin/edit.php4.22 ▲0.8660.05 ▲2.38
Add New Post /wp-admin/post-new.php6.71 ▲0.8297.27 ▼7.25
Media Library /wp-admin/upload.php4.03 ▲0.8045.30 ▲7.04

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 398 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
db_upgraded
widget_tide_table
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Waiting for the tide (UK)
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,905 ▲11913.86 ▼0.709.43 ▲7.3739.09 ▲0.56
Dashboard /wp-admin2,199 ▲225.67 ▲0.0195.70 ▲3.2241.23 ▼8.26
Posts /wp-admin/edit.php2,107 ▲42.04 ▲0.0240.52 ▲0.9836.22 ▼3.07
Add New Post /wp-admin/post-new.php1,530 ▲223.20 ▼0.03596.47 ▼52.9449.35 ▼7.70
Media Library /wp-admin/upload.php1,407 ▲104.30 ▲0.0497.57 ▼12.2442.32 ▼3.29

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_recent-comments
    • widget_tide_table
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 0% 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
The following issues need your attention
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/waiting-for-the-tide-uk/tide-plugin.php
  • 197× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/waiting-for-the-tide-uk/lib/guzzlehttp/psr7/src/LimitStream.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'Twig\ode\ode' not found in wp-content/plugins/waiting-for-the-tide-uk/lib/twig/twig/src/Node/DeprecatedNode.php:23
    • > PHP Fatal error
      Uncaught Error: Class 'Twig\ode\\Expression\\TestExpression' not found in wp-content/plugins/waiting-for-the-tide-uk/lib/twig/twig/src/Node/Expression/Test/NullTest.php:24
    • > PHP Fatal error
      Uncaught Error: Class 'Twig\ode\ode' not found in wp-content/plugins/waiting-for-the-tide-uk/lib/twig/twig/src/Node/SandboxNode.php:21
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\Promise\\PromiseInterface' not found in wp-content/plugins/waiting-for-the-tide-uk/lib/guzzlehttp/promises/src/Promise.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'Twig\ode\\Expression\\Binary\\AbstractBinary' not found in wp-content/plugins/waiting-for-the-tide-uk/lib/twig/twig/src/Node/Expression/Binary/AndBinary.php:17
    • > PHP Fatal error
      Uncaught Error: Interface 'Twig\odeVisitor\odeVisitorInterface' not found in wp-content/plugins/waiting-for-the-tide-uk/lib/twig/twig/src/NodeVisitor/EscaperNodeVisitor.php:35
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\Promise\\PromisorInterface' not found in wp-content/plugins/waiting-for-the-tide-uk/lib/guzzlehttp/guzzle/src/Pool.php:24
    • > PHP Fatal error
      Uncaught Error: Class 'Twig\ode\\Expression\\Binary\\AbstractBinary' not found in wp-content/plugins/waiting-for-the-tide-uk/lib/twig/twig/src/Node/Expression/Binary/PowerBinary.php:16
    • > PHP Fatal error
      Uncaught Error: Interface 'Twig\odeVisitor\odeVisitorInterface' not found in wp-content/plugins/waiting-for-the-tide-uk/lib/twig/twig/src/NodeVisitor/SandboxNodeVisitor.php:34

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 86% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
5 plugin tags: uk tides, waiting for the tide, tides, tide times, tide heights

waiting-for-the-tide-uk/tide-plugin.php 69% from 13 tests

The entry point to "Waiting for the tide (UK)" version 1.0.7 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Domain Path: The domain path folder was not found ("/languages")
  • Description: Keep the plugin description shorter than 140 characters (currently 179 characters long)
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("waiting-for-the-tide-uk.php" instead of "tide-plugin.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin31,305 lines of code in 365 files:
LanguageFilesBlank linesComment linesLines of code
PHP3194,81110,12324,935
Markdown151,23303,601
JSON15001,380
CSS41119537
Sass2276408
Twig2264147
JavaScript43915144
YAML34333143
reStructuredText18510

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.48
Average class complexity10.02
▷ Minimum class complexity1.00
▷ Maximum class complexity166.00
Average method complexity2.67
▷ Minimum method complexity1.00
▷ Maximum method complexity33.00
Code structure
Namespaces40
Interfaces38
Traits3
Classes256
▷ Abstract classes124.69%
▷ Concrete classes24495.31%
▷ Final classes9538.93%
Methods1,627
▷ Static methods21213.03%
▷ Public methods1,38985.37%
▷ Protected methods523.20%
▷ Private methods18611.43%
Functions287
▷ Named functions18464.11%
▷ Anonymous functions10335.89%
Constants124
▷ Global constants75.65%
▷ Class constants11794.35%
▷ Public constants10589.74%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
10 PNG files occupy 1.03MB with 0.69MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/icon-256x256.png15.50KB5.65KB▼ 63.56%
assets/icon-128x128.png7.97KB3.24KB▼ 59.33%
assets/screenshot-2.png187.34KB54.58KB▼ 70.87%
assets/banner-772x250.png63.07KB18.41KB▼ 70.82%
assets/screenshot-4.png191.46KB53.80KB▼ 71.90%