84% tsa-commerce

Code Review | TSA Commerce

WordPress plugin TSA Commerce scored84%from 54 tests.

About plugin

  • Plugin page: tsa-commerce
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.9.8
  • WordPress version: 6.3.1
  • First release: Jun 21, 2017
  • Latest release: Aug 21, 2018
  • Number of updates: 10
  • Update frequency: every 42.6 days
  • Top authors: sjrocha (60%)pablorocha (50%)

Code review

54 tests

User reviews

5 reviews

Install metrics

100+ active /5,837 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲1.55MB] [CPU: ▲12.41ms] Passed 4 tests

Server-side resources used by TSA Commerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /4.85 ▲1.3856.49 ▲14.04
Dashboard /wp-admin4.94 ▲1.6358.27 ▲7.43
Posts /wp-admin/edit.php4.99 ▲1.6363.20 ▲14.45
Add New Post /wp-admin/post-new.php7.51 ▲1.62108.77 ▲13.73
Media Library /wp-admin/upload.php4.81 ▲1.5851.00 ▲15.42
Settings /wp-admin/edit.php?post_type=tsa_product&page=settings4.7640.25
All Products /wp-admin/edit.php?post_type=tsa_product4.8447.12
Add New /wp-admin/post-new.php?post_type=tsa_product5.0361.85
Categories /wp-admin/edit-tags.php?taxonomy=tsa_product_category&post_type=tsa_product4.9551.57

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 160 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
db_upgraded
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for TSA Commerce
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,829 ▲6814.37 ▲0.081.92 ▲0.2542.71 ▼4.50
Dashboard /wp-admin2,227 ▲495.53 ▼0.0582.61 ▼27.5837.48 ▼6.97
Posts /wp-admin/edit.php2,138 ▲382.02 ▲0.0342.37 ▲3.9139.47 ▲3.65
Add New Post /wp-admin/post-new.php6,651 ▲5,12024.21 ▲0.981,007.37 ▲331.9242.29 ▼14.45
Media Library /wp-admin/upload.php1,429 ▲264.23 ▲0.06105.47 ▲2.1652.02 ▲6.20
Settings /wp-admin/edit.php?post_type=tsa_product&page=settings8512.0023.9827.76
All Products /wp-admin/edit.php?post_type=tsa_product1,1071.9829.9830.82
Add New /wp-admin/post-new.php?post_type=tsa_product2,3607.95185.5342.50
Categories /wp-admin/edit-tags.php?taxonomy=tsa_product_category&post_type=tsa_product2,0847.44142.1635.91

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded

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 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
  • 48× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'acf_field' not found in wp-content/plugins/tsa-commerce/vendors/acf/core/fields/post_object.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'acf_field' not found in wp-content/plugins/tsa-commerce/vendors/acf/core/fields/dummy.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/tsa-commerce/vendors/acf/core/controllers/export.php:32
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/tsa-commerce/vendors/acf/core/controllers/input.php:28
    • > PHP Fatal error
      Uncaught Error: Class 'acf_field' not found in wp-content/plugins/tsa-commerce/vendors/acf/core/fields/user.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function tsac_get_path() in wp-content/plugins/tsa-commerce/lib/vendors.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/tsa-commerce/vendors/acf/core/controllers/revisions.php:30
    • > PHP Fatal error
      Uncaught Error: Class 'acf_field' not found in wp-content/plugins/tsa-commerce/vendors/acf/core/fields/radio.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'acf_field' not found in wp-content/plugins/tsa-commerce/vendors/acf/core/fields/number.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/tsa-commerce/vendors/acf/core/controllers/upgrade.php:25

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)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
7 plugin tags: amazon, tsa-commerce, commerce, tsa, tsacommerce...

tsa-commerce/tsa-commerce.php Passed 13 tests

"TSA Commerce" version 1.0.2's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
87 characters long description:
Convierte tu Wordpress en un "Turbo SEO Affiliate Commerce". Fácil, sencillo y ligero.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
No dangerous file extensions were detected38,678 lines of code in 100 files:
LanguageFilesBlank linesComment linesLines of code
PO File249,36913,72620,485
PHP524,0684,5969,768
JavaScript183,6792,6706,104
CSS66853792,321

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity23.97
▷ Minimum class complexity1.00
▷ Maximum class complexity106.00
Average method complexity4.20
▷ Minimum method complexity1.00
▷ Maximum method complexity62.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes39
▷ Abstract classes00.00%
▷ Concrete classes39100.00%
▷ Final classes00.00%
Methods280
▷ Static methods00.00%
▷ Public methods280100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions60
▷ Named functions60100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
21 compressed PNG files occupy 0.20MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
vendors/acf/core/fields/date_picker/images/ui-icons_cd0a0a_256x240.png4.27KB4.11KB▼ 3.78%
vendors/acf/core/fields/date_picker/images/ui-bg_highlight-soft_0_444444_1x100.png0.08KB0.08KB0.00%
vendors/acf/core/fields/date_picker/images/ui-bg_glass_65_ffffff_1x400.png0.10KB0.10KB▼ 5.71%
vendors/acf/screenshot-3.png38.23KB37.15KB▼ 2.83%
vendors/acf/core/fields/date_picker/images/ui-bg_glass_75_dadada_1x400.png0.11KB0.16KB0.00%