84% spreadshop

Code Review | Spreadshop Plugin

WordPress plugin Spreadshop Plugin scored84%from 54 tests.

About plugin

  • Plugin page: spreadshop
  • Plugin version: 1.6.6
  • PHP version: 7.4.16
  • WordPress compatibility: 1.0-5.8.0
  • WordPress version: 6.3.1
  • First release: May 2, 2017
  • Latest release: Apr 4, 2023
  • Number of updates: 99
  • Update frequency: every 57.3 days
  • Top authors: r0b3rt0 (97.98%)tassoman (3.03%)

Code review

54 tests

User reviews

5 reviews

Install metrics

5,000+ active /75,328 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

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

This is a short check of server-side resources used by Spreadshop Plugin
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0246.88 ▲2.33
Dashboard /wp-admin3.34 ▲0.0351.79 ▲1.95
Posts /wp-admin/edit.php3.39 ▲0.0350.77 ▼1.95
Add New Post /wp-admin/post-new.php5.92 ▲0.03104.10 ▲7.08
Media Library /wp-admin/upload.php3.26 ▲0.0337.82 ▲2.61

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 11 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
db_upgraded
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Spreadshop Plugin
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,829 ▲4314.35 ▲0.051.96 ▼0.0741.34 ▼2.81
Dashboard /wp-admin2,195 ▲185.57 ▼0.0189.66 ▼5.2774.68 ▲20.58
Posts /wp-admin/edit.php2,118 ▲182.02 ▼0.0234.35 ▼9.1332.29 ▼5.25
Add New Post /wp-admin/post-new.php1,693 ▲14822.01 ▼1.16777.37 ▲79.9555.17 ▼14.34
Media Library /wp-admin/upload.php1,418 ▲184.14 ▼0.06103.88 ▼0.5875.37 ▲26.78

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
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/spreadshop/spreadshop-embed-as-template.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/spreadshop/spreadshop.php:32

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 97% 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 need to be fixed:
  • Tags: Please delete some tags, you are using 12 tag instead of maximum 10
Please take inspiration from this readme.txt

spreadshop/spreadshop.php Passed 13 tests

"Spreadshop Plugin" version 1.6.6's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
57 characters long description:
This plugin integrates a Spreadshirt Shop into Wordpress.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Everything looks great! No dangerous files found in this plugin704 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP75960624
CSS118080

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity12.25
▷ Minimum class complexity1.00
▷ Maximum class complexity32.00
Average method complexity3.50
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods18
▷ Static methods18100.00%
▷ Public methods633.33%
▷ Protected methods00.00%
▷ Private methods1266.67%
Functions11
▷ Named functions11100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
style/images/sprd_icon.png0.37KB0.31KB▼ 16.19%