83% wp-tide-height-calculator

Code Review | WP-Tide-Height-Calculator

WordPress plugin WP-Tide-Height-Calculator scored83%from 54 tests.

About plugin

  • Plugin page: wp-tide-height-ca...
  • Plugin version: 1.8
  • PHP version: 7.4.16
  • WordPress compatibility: 2.0-5.6
  • WordPress version: 6.3.1
  • First release: Apr 18, 2015
  • Latest release: Mar 6, 2021
  • Number of updates: 23
  • Update frequency: every 93.4 days
  • Top authors: arsho (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /5,425 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

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

A check of server-side resources used by WP-Tide-Height-Calculator
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0033.98 ▼5.57
Dashboard /wp-admin3.31 ▲0.0043.85 ▼5.23
Posts /wp-admin/edit.php3.36 ▲0.0043.95 ▼6.99
Add New Post /wp-admin/post-new.php5.89 ▲0.0079.65 ▼25.60
Media Library /wp-admin/upload.php3.23 ▲0.0031.46 ▼4.12

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
db_upgraded
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for WP-Tide-Height-Calculator
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.26 ▼1.021.69 ▼0.2340.82 ▼2.04
Dashboard /wp-admin2,200 ▲155.81 ▼0.06102.17 ▲1.0439.80 ▲1.00
Posts /wp-admin/edit.php2,089 ▼32.06 ▲0.0133.63 ▼9.6935.93 ▼0.96
Add New Post /wp-admin/post-new.php1,533 ▲923.68 ▲0.32671.53 ▲43.8051.84 ▲0.89
Media Library /wp-admin/upload.php1,388 ▲64.19 ▼0.0498.88 ▲3.4343.35 ▲0.17

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 did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

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

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
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/wp-tide-height-calculator/WP-Tide-Height-Calculator.php:375

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

readme.txt 94% 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 to be fixed:
  • Screenshots: Screenshot #1 (Tide Height Calculator in action.) image missing
The official readme.txt might help

wp-tide-height-calculator/WP-Tide-Height-Calculator.php 85% from 13 tests

The entry point to "WP-Tide-Height-Calculator" version 1.8 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("wp-tide-height-calculator.php" instead of "WP-Tide-Height-Calculator.php")
  • Description: Keep the plugin description shorter than 140 characters (currently 262 characters long)

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
Success! There were no dangerous files found in this plugin330 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP13411330

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.00
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
1 PNG file occupies 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png20.58KB14.20KB▼ 31.01%