90% sparxpres-for-woocommerce

Code Review | Sparxpres for WooCommerce

WordPress plugin Sparxpres for WooCommerce scored 90% from 54 tests.

About plugin

  • Plugin page: sparxpres-for-woo...
  • Plugin version: 1.2.15
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.9-6.3
  • WordPress version: 6.3.1
  • First release: Feb 2, 2021
  • Latest release: Aug 7, 2023
  • Number of updates: 39
  • Update frequency: every 23.5 days
  • Top authors: sparxpres (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active / 3,996 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼3.38ms] Passed 4 tests

Server-side resources used by Sparxpres for WooCommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0035.99 ▼7.39
Dashboard /wp-admin3.31 ▲0.0143.51 ▼2.85
Posts /wp-admin/edit.php3.36 ▲0.0044.96 ▼2.32
Add New Post /wp-admin/post-new.php5.89 ▲0.0092.34 ▲1.16
Media Library /wp-admin/upload.php3.23 ▲0.0033.18 ▼0.96

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 28 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
can_compress_scripts
db_upgraded
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

Sparxpres for WooCommerce: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲2913.36 ▼1.321.65 ▼0.8039.55 ▼5.79
Dashboard /wp-admin2,206 ▲185.83 ▲0.78105.23 ▼3.7143.07 ▲1.81
Posts /wp-admin/edit.php2,089 ▼02.02 ▲0.0238.74 ▲3.8135.25 ▼1.49
Add New Post /wp-admin/post-new.php1,533 ▼023.40 ▲0.14655.33 ▲7.0753.44 ▲3.88
Media Library /wp-admin/upload.php1,388 ▲64.20 ▲0.0295.79 ▼3.9443.34 ▲1.27

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options

Smoke tests Passed 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 Passed 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
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
4 plugin tags: sparxpres, loan, banking, finance

sparxpres-for-woocommerce/sparxpres-for-woocommerce.php 92% from 13 tests

The principal PHP file in "Sparxpres for WooCommerce" v. 1.2.15 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected2,026 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
PHP102103481,249
CSS14815295
JavaScript2339235
PO File15266114
HTML37098
SVG20035

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity19.00
▷ Minimum class complexity4.00
▷ Maximum class complexity52.00
Average method complexity2.73
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods73
▷ Static methods1723.29%
▷ Public methods5778.08%
▷ Protected methods11.37%
▷ Private methods1520.55%
Functions8
▷ Named functions787.50%
▷ Anonymous functions112.50%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG files were detected