83% emissary-for-woocommerce

Code Review | Emissary for Woocommerce

WordPress plugin Emissary for Woocommerce scored83%from 54 tests.

About plugin

  • Plugin page: emissary-for-wooc...
  • Plugin version: 2.2.2
  • PHP compatiblity: 5.2.17+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-6.2
  • WordPress version: 6.3.1
  • First release: Feb 5, 2021
  • Latest release: Oct 16, 2023
  • Number of updates: 27
  • Update frequency: every 36.4 days
  • Top authors: jsaldanav (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,216 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼2.86ms] Passed 4 tests

This is a short check of server-side resources used by Emissary for Woocommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0247.89 ▲10.68
Dashboard /wp-admin3.33 ▲0.0248.70 ▼0.30
Posts /wp-admin/edit.php3.38 ▲0.0245.33 ▼4.15
Add New Post /wp-admin/post-new.php5.91 ▲0.0284.62 ▼9.06
Media Library /wp-admin/upload.php3.25 ▲0.0236.42 ▲2.07

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 20 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Emissary for Woocommerce
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.17 ▼0.501.73 ▲0.1046.44 ▲6.41
Dashboard /wp-admin2,195 ▲155.62 ▼0.0694.82 ▼4.5841.48 ▼3.05
Posts /wp-admin/edit.php2,100 ▼02.03 ▲0.0235.73 ▼6.4835.49 ▼2.26
Add New Post /wp-admin/post-new.php1,526 ▼222.97 ▼0.13651.86 ▲9.9858.95 ▼2.84
Media Library /wp-admin/upload.php1,403 ▲34.19 ▼0.01104.55 ▲9.0643.40 ▼1.75

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
  • 8× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/emissary-for-woocommerce/public/templates/cart-shipping.php on line 14
    • > PHP Warning
      include_once(ABSPATHwp-admin/includes/plugin.php): failed to open stream: No such file or directory in wp-content/plugins/emissary-for-woocommerce/admin/emissary-admin.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/emissary-for-woocommerce/admin/emissary-admin.php:466
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/emissary-for-woocommerce/admin/emissary-admin.php on line 3
    • > PHP Warning
      include_once(): Failed opening 'ABSPATHwp-admin/includes/plugin.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/emissary-for-woocommerce/admin/emissary-admin.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/emissary-for-woocommerce/emissary.php:14
    • > PHP Warning
      include_once(): Failed opening 'ABSPATHwp-admin/includes/plugin.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/emissary-for-woocommerce/public/templates/cart-shipping.php on line 14
    • > PHP Warning
      include_once(ABSPATHwp-admin/includes/plugin.php): failed to open stream: No such file or directory in wp-content/plugins/emissary-for-woocommerce/public/templates/cart-shipping.php on line 14

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
6 plugin tags: paqueteras, logstica, emissary, woocommerce, envos...

emissary-for-woocommerce/emissary.php 77% from 13 tests

"Emissary for Woocommerce" version 2.2.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please take the time to fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 228 characters long)
  • Text Domain: The text domain name must use dashes instead of underscores, and it must be lowercase
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("emissary-for-woocommerce.php" instead of "emissary.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin1,335 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
PHP79652723
CSS2337362
JSON200140
JavaScript2241110

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity27.00
▷ Minimum class complexity6.00
▷ Maximum class complexity48.00
Average method complexity2.58
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods13
▷ Static methods538.46%
▷ Public methods13100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions13
▷ Named functions1076.92%
▷ Anonymous functions323.08%
Constants2
▷ Global constants2100.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
4 compressed PNG files occupy 0.01MB
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/images/FEDEX.png2.21KB2.21KB0.00%
admin/images/UPS.png2.51KB2.50KB0.23%
admin/images/DOSTAVISTA.png2.51KB2.50KB▼ 0.62%
admin/images/DHL.png2.96KB2.96KB0.00%