84% stm-woocommerce-gallery

Code Review | STM WooCommerce Gallery 1.9

WordPress plugin STM WooCommerce Gallery 1.9 scored84%from 54 tests.

About plugin

  • Plugin page: stm-woocommerce-g...
  • Plugin version: 1.9
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6.1-4.7
  • WordPress version: 6.3.1
  • First release: Dec 27, 2016
  • Latest release: Dec 28, 2016
  • Number of updates: 14
  • Update frequency: every 0.1 days
  • Top authors: sergiotoca (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,552 total downloads

Benchmarks

Plugin footprint 82% 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.23MB] [CPU: ▼11.52ms] Passed 4 tests

A check of server-side resources used by STM WooCommerce Gallery 1.9
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.71 ▲0.2545.02 ▼3.64
Dashboard /wp-admin3.54 ▲0.2052.19 ▼10.19
Posts /wp-admin/edit.php3.66 ▲0.3053.62 ▼0.51
Add New Post /wp-admin/post-new.php6.13 ▲0.2484.58 ▼29.94
Media Library /wp-admin/upload.php3.47 ▲0.2437.53 ▼2.31

Server storage [IO: ▲1.14MB] [DB: ▲0.00MB] 67% from 3 tests

A short overview of filesystem and database impact
It is recommended to fix the following issues
  • You have illegally modified 1 file (0.76KB) outside of "wp-content/plugins/stm-woocommerce-gallery/" and "wp-content/uploads/"
    • (new file) wp-content/themes/twentytwentyone/stmpili-template.php
Filesystem: 24 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for STM WooCommerce Gallery 1.9
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,896 ▲11014.16 ▼0.579.05 ▲6.9343.59 ▲5.42
Dashboard /wp-admin2,198 ▲215.63 ▼0.0394.51 ▲6.1742.76 ▼0.64
Posts /wp-admin/edit.php2,109 ▲62.05 ▲0.0839.40 ▼1.1133.90 ▼4.25
Add New Post /wp-admin/post-new.php1,533 ▲523.32 ▲0.27644.58 ▼36.3755.20 ▼7.28
Media Library /wp-admin/upload.php1,403 ▲64.25 ▲0.02121.50 ▲15.6948.42 ▲5.75

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
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options

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
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The following issues need your attention
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/stm-woocommerce-gallery/stmpili-template.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/stm-woocommerce-gallery/stm-woocommerce-gallery.php:63

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)
There were no browser issues found

Optimizations

Plugin configuration 96% 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
9 plugin tags: images, gallery, collage, product, woocommerce...

stm-woocommerce-gallery/stm-woocommerce-gallery.php 92% from 13 tests

This is the main PHP file of "STM WooCommerce Gallery 1.9" version 1.9, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

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
Everything looks great! No dangerous files found in this plugin1,442 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP23701801,226
CSS31729131
JavaScript411869
SVG14016

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.38
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%
Functions34
▷ Named functions34100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
No PNG files were detected