84% wc-speed-drain-repair

Code Review | WooCommerce Speed Drain Repair

WordPress plugin WooCommerce Speed Drain Repair scored84%from 54 tests.

About plugin

  • Plugin page: wc-speed-drain-re...
  • Plugin version: 2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.3
  • WordPress version: 6.3.1
  • First release: Oct 20, 2015
  • Latest release: Aug 10, 2023
  • Number of updates: 38
  • Update frequency: every 75.0 days
  • Top authors: wpfixit (100%)

Code review

54 tests

User reviews

24 reviews

Install metrics

2,000+ active /43,556 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.00MB] [CPU: ▼9.54ms] Passed 4 tests

Analyzing server-side resources used by WooCommerce Speed Drain Repair
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.40 ▼0.0622.33 ▼15.60
Dashboard /wp-admin3.32 ▲0.0245.73 ▲0.19
Posts /wp-admin/edit.php3.38 ▲0.0246.54 ▲0.82
Add New Post /wp-admin/post-new.php5.91 ▲0.0280.91 ▼23.58
Media Library /wp-admin/upload.php3.25 ▲0.0236.09 ▲1.79

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 2 new files
Database: no new tables, 6 new options
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 WooCommerce Speed Drain Repair
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,842 ▲8114.74 ▲0.381.91 ▲0.2838.53 ▼1.12
Dashboard /wp-admin2,203 ▲235.54 ▼0.1090.28 ▲2.7439.17 ▼6.88
Posts /wp-admin/edit.php2,108 ▲81.98 ▼0.0438.05 ▲1.0437.55 ▲4.01
Add New Post /wp-admin/post-new.php1,545 ▲918.01 ▼5.28624.82 ▲30.5166.86 ▲14.64
Media Library /wp-admin/upload.php1,402 ▲24.15 ▼0.0095.05 ▲0.0842.43 ▲0.76

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded

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)
Everything seems fine, however this is by no means an exhaustive test

SRP 50% 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
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wc-speed-drain-repair/wcsdr.php:18

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)
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
4 plugin tags: speed up woocomerce, fast woocommerce, woocommerce, woocommerce speed

wc-speed-drain-repair/wcsdr.php 85% from 13 tests

"WooCommerce Speed Drain Repair" version 2.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
It is important to fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 279 characters long)
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("wc-speed-drain-repair.php" instead of "wcsdr.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
Everything looks great! No dangerous files found in this plugin67 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP141767

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.18
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
PNG images were not found in this plugin