10% floship-insurance

Code Review | Floship Parcel Shipping Insurance

WordPress plugin Floship Parcel Shipping Insurance scored10%from 54 tests.

About plugin

  • Plugin page: floship-insurance
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.1.1
  • WordPress version: 6.3.1
  • First release: Mar 28, 2023
  • Latest release: Apr 4, 2023
  • Number of updates: 5
  • Update frequency: every 5.6 days
  • Top authors: floship (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /99 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
These installer errors require your attention
  • This plugin did not install gracefully
    • > Parse error in wp-content/plugins/floship-insurance/public/floship-insurance-custom-fields.php+99
    syntax error, unexpected end of file

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

An overview of server-side resources used by Floship Parcel Shipping Insurance
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0047.22 ▲5.27
Dashboard /wp-admin3.31 ▲0.0050.91 ▼3.59
Posts /wp-admin/edit.php3.36 ▲0.0046.26 ▼8.99
Add New Post /wp-admin/post-new.php5.89 ▲0.0085.96 ▼5.68
Media Library /wp-admin/upload.php3.23 ▲0.0038.96 ▲2.34

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 18 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

Floship Parcel Shipping Insurance: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.34 ▲0.151.78 ▲0.0340.47 ▼9.45
Dashboard /wp-admin2,195 ▲185.55 ▼0.0590.44 ▼12.7641.10 ▼2.89
Posts /wp-admin/edit.php2,100 ▼01.96 ▲0.0135.03 ▼3.7833.31 ▼3.20
Add New Post /wp-admin/post-new.php1,526 ▼020.95 ▼2.19737.31 ▲82.2171.69 ▲15.51
Media Library /wp-admin/upload.php1,403 ▲34.19 ▼0.02100.09 ▲3.1841.52 ▼1.60

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
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • 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
Even though no errors were found, 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
  • 5× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/floship-insurance/admin/floship-insurance-admin.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/floship-insurance/admin/floship-insurance-meta-field-updates.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/floship-insurance/public/floship-insurance-public.php:63
    • > PHP Parse error
      syntax error, unexpected end of file in wp-content/plugins/floship-insurance/public/floship-insurance-custom-fields.php on line 99
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/floship-insurance/public/floship-insurance-data-store.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need to be fixed:
  • Screenshots: No descriptions were found for these screenshots #10, #2, #3, #4, #5, #6, #7, #8, #9 in floship-insurance/assets to your readme.txt
You can look at the official readme.txt

floship-insurance/floship-insurance.php 92% from 13 tests

"Floship Parcel Shipping Insurance" version 1.0.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Domain Path: The domain path points to a folder that does not exist ("/languages")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
There were no executable files found in this plugin406 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP9149104388
JavaScript19018

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods2
▷ Static methods2100.00%
▷ Public methods2100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions22
▷ Named functions2195.45%
▷ Anonymous functions14.55%
Constants1
▷ Global constants1100.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.02MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
public/images/floship-logo-navy.png9.22KB4.27KB▼ 53.64%
public/images/old_floship-logo-navy.png9.58KB5.39KB▼ 43.77%