78% speedaf-express-for-woocommerce

Code Review | Speedaf Express for woocommerce

WordPress plugin Speedaf Express for woocommerce scored78%from 54 tests.

About plugin

  • Plugin page: speedaf-express-f...
  • Plugin version: 1.2.2
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.8.2-6.3
  • WordPress version: 6.3.1
  • First release: Jul 23, 2022
  • Latest release: Oct 26, 2023
  • Number of updates: 34
  • Update frequency: every 13.8 days
  • Top authors: speedaf (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /932 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.03MB] [CPU: ▼4.57ms] Passed 4 tests

A check of server-side resources used by Speedaf Express for woocommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0335.38 ▼0.68
Dashboard /wp-admin3.34 ▲0.0345.59 ▼3.17
Posts /wp-admin/edit.php3.45 ▲0.0942.54 ▼4.70
Add New Post /wp-admin/post-new.php5.92 ▲0.0388.20 ▼9.74
Media Library /wp-admin/upload.php3.26 ▲0.0335.89 ▲0.20

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 72 new files
Database: 1 new table, 6 new options
New tables
wp_spf_track_subscribe
New WordPress options
db_upgraded
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for Speedaf Express for woocommerce
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.25 ▼0.281.70 ▲0.1040.33 ▼0.65
Dashboard /wp-admin2,192 ▲145.49 ▼0.2480.76 ▼23.1536.66 ▼5.28
Posts /wp-admin/edit.php2,100 ▲31.98 ▲0.0134.82 ▼1.4033.35 ▼4.47
Add New Post /wp-admin/post-new.php1,531 ▲522.96 ▼0.10578.79 ▼93.7451.15 ▲1.17
Media Library /wp-admin/upload.php1,397 ▼34.20 ▲0.0393.42 ▼4.4339.90 ▼0.81

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/speedaf-express-for-woocommerce/templates/table/order-body.php
  • 8× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Parse error
      syntax error, unexpected end of file in wp-content/plugins/speedaf-express-for-woocommerce/templates/order/tracking.php on line 55
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/speedaf-express-for-woocommerce/templates/table/order-sender-popup.php:5
    • > PHP Parse error
      syntax error, unexpected end of file in wp-content/plugins/speedaf-express-for-woocommerce/templates/table/print-order.php on line 101
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/speedaf-express-for-woocommerce/templates/settings/speedaf_settings_view.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'Wolf\\Speedaf\\Helper\\SpfHelper' not found in wp-content/plugins/speedaf-express-for-woocommerce/templates/table/order.php:2
    • > PHP Notice
      Undefined variable: orders in wp-content/plugins/speedaf-express-for-woocommerce/templates/table/order-body.php on line 11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/speedaf-express-for-woocommerce/templates/account/tracking.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/speedaf-express-for-woocommerce/templates/order/meta-box.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that require attention: The official readme.txt might help

speedaf-express-for-woocommerce/wc-speedaf.php 85% from 13 tests

The principal PHP file in "Speedaf Express for woocommerce" v. 1.2.2 is loaded by WordPress automatically on each request
The following require your attention:
  • Requires at least: The required version number did not match the one declared in readme.txt ("5.1" instead of "6.8.2")
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("speedaf-express-for-woocommerce.php" instead of "wc-speedaf.php")

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
No dangerous file extensions were detected6,637 lines of code in 62 files:
LanguageFilesBlank linesComment linesLines of code
PHP408348912,808
CSS7573882,771
JavaScript132832221,031
JSON10026
SVG1001

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity10.90
▷ Minimum class complexity1.00
▷ Maximum class complexity64.00
Average method complexity2.80
▷ Minimum method complexity1.00
▷ Maximum method complexity38.00
Code structure
Namespaces11
Interfaces3
Traits0
Classes26
▷ Abstract classes311.54%
▷ Concrete classes2388.46%
▷ Final classes00.00%
Methods182
▷ Static methods2010.99%
▷ Public methods14076.92%
▷ Protected methods105.49%
▷ Private methods3217.58%
Functions24
▷ Named functions416.67%
▷ Anonymous functions2083.33%
Constants35
▷ Global constants617.14%
▷ Class constants2982.86%
▷ Public constants29100.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.01MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/icons.png3.36KB3.35KB0.20%
assets/img/speedaf-logo.png9.27KB2.69KB▼ 70.96%