73% insurify

Code Review | Insurify - Order & Shipping Protection

WordPress plugin Insurify - Order & Shipping Protection scored73%from 54 tests.

About plugin

  • Plugin page: insurify
  • Plugin version: 1.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.8
  • WordPress version: 6.3.1
  • First release: Jan 27, 2022
  • Latest release: Jan 28, 2022
  • Number of updates: 16
  • Update frequency: every 0.2 days
  • Top authors: webinopoly (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /638 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.17MB] [CPU: ▲560.19ms] 75% from 4 tests

Analyzing server-side resources used by Insurify - Order & Shipping Protection
Please have a look at the following items
  • Extra CPU: The extra CPU usage should be kept under 200.00ms (currently 560.19ms on /wp-admin/upload.php)
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.11626.72 ▲587.59
Dashboard /wp-admin3.54 ▲0.19628.01 ▲572.30
Posts /wp-admin/edit.php3.59 ▲0.23593.30 ▲548.79
Add New Post /wp-admin/post-new.php6.08 ▲0.19626.18 ▲532.07
Media Library /wp-admin/upload.php3.40 ▲0.17718.82 ▲684.39

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Insurify - Order & Shipping Protection
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,480 ▼28113.67 ▼0.600.48 ▼1.1215.45 ▼24.20
Dashboard /wp-admin2,231 ▲545.66 ▲0.0191.21 ▼4.1438.47 ▲0.61
Posts /wp-admin/edit.php2,115 ▲152.52 ▲0.5036.87 ▼2.1636.47 ▼0.10
Add New Post /wp-admin/post-new.php1,553 ▲2521.38 ▼1.81653.01 ▲5.3246.54 ▼13.48
Media Library /wp-admin/upload.php1,436 ▲364.94 ▲0.73114.70 ▲18.4445.66 ▲1.91

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • The plugin did not uninstall successfully, leaving 59 files (4.38MB) in the plugin directory
    • (new file) images/broken-product.jpg
    • (new file) css/ecomsurance.css
    • (new file) css/tailwind.min.css
    • (new file) images/CloseIcon.svg
    • (new file) css/jquery.dataTables.css
    • (new file) class.ecomsurance.php
    • (new file) css/style.css
    • (new file) class.ecomsurance-stripe.php
    • (new file) images/check_img.png
    • (new file) ecomsurance.php
    • ...
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts

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)
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_head() in wp-content/plugins/insurify/views/frontend/ecomsurance-frontpage-template.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 88% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
These attributes need your attention:
  • Donate link: Please fix this invalid URI: "#"
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === insurify === )
The official readme.txt might help

insurify/ecomsurance.php 77% from 13 tests

The primary PHP file in "Insurify - Order & Shipping Protection" version 1.0 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("insurify.php" instead of "ecomsurance.php")
  • Description: Keep the plugin description shorter than 140 characters (currently 238 characters long)
  • Text Domain: Please use dashes and lowercase characters for text domains

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
Success! There were no dangerous files found in this plugin27,151 lines of code in 41 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript62,0886,89119,753
PHP309521505,955
CSS427331,438
SVG1005

PHP code Passed 2 tests

Analyzing 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.39
Average class complexity13.25
▷ Minimum class complexity8.00
▷ Maximum class complexity19.00
Average method complexity2.44
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods33
▷ Static methods3296.97%
▷ Public methods3193.94%
▷ Protected methods00.00%
▷ Private methods26.06%
Functions11
▷ Named functions981.82%
▷ Anonymous functions218.18%
Constants7
▷ Global constants685.71%
▷ Class constants114.29%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
13 PNG files occupy 0.11MB with 0.03MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/sort_asc_disabled.png0.14KB0.25KB0.00%
images/sort_desc.png0.15KB0.25KB0.00%
images/step-1.png8.79KB4.93KB▼ 43.89%
images/sort_desc_disabled.png0.14KB0.25KB0.00%
images/search_img.png25.53KB7.43KB▼ 70.91%