84% trusted-order-notifications

Code Review | Trusted Order Notifications

WordPress plugin Trusted Order Notifications scored84%from 54 tests.

About plugin

  • Plugin page: trusted-order-not...
  • Plugin version: 3.0.0
  • PHP compatiblity: 5.6.3+
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Oct 26, 2018
  • Latest release: Jul 12, 2021
  • Number of updates: 19
  • Update frequency: every 52.2 days
  • Top authors: doantienluc (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

100+ active /2,487 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▲0.06MB] [CPU: ▼2.33ms] Passed 4 tests

A check of server-side resources used by Trusted Order Notifications
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0639.18 ▼1.22
Dashboard /wp-admin3.36 ▲0.0651.04 ▼0.88
Posts /wp-admin/edit.php3.47 ▲0.1254.92 ▲4.31
Add New Post /wp-admin/post-new.php5.94 ▲0.0587.71 ▼6.05
Media Library /wp-admin/upload.php3.28 ▲0.0537.76 ▼1.17

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 15 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Trusted Order Notifications
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,969 ▲18314.03 ▼0.3214.28 ▲12.0047.88 ▼2.00
Dashboard /wp-admin2,231 ▲515.79 ▲0.1387.44 ▼12.5539.28 ▼4.55
Posts /wp-admin/edit.php2,135 ▲352.26 ▲0.2442.88 ▲5.6332.15 ▼3.98
Add New Post /wp-admin/post-new.php1,551 ▲2323.69 ▲0.48677.89 ▲27.6636.97 ▼19.29
Media Library /wp-admin/upload.php1,427 ▲304.40 ▲0.0199.99 ▼13.9641.96 ▼4.17

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • 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
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 have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/trusted-order-notifications/includes/options-dashboard.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need to be fixed: The official readme.txt might help

trusted-order-notifications/trusted-order-notifications.php 92% from 13 tests

"Trusted Order Notifications" version 3.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:
  • 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 an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous files found in this plugin376 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP448119329
PO File1153044
JavaScript1102
CSS1001

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity44.00
▷ Minimum class complexity44.00
▷ Maximum class complexity44.00
Average method complexity4.07
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes1100.00%
Methods14
▷ Static methods17.14%
▷ Public methods1392.86%
▷ Protected methods00.00%
▷ Private methods17.14%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
3 PNG files occupy 0.06MB with 0.03MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/icon.png0.93KB0.37KB▼ 59.98%
screenshot-1.png29.56KB13.40KB▼ 54.68%
screenshot-2.png34.54KB17.76KB▼ 48.58%