73% woo-braspress

Code Review | Woo Braspress

WordPress plugin Woo Braspress scored73%from 54 tests.

About plugin

  • Plugin page: woo-braspress
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.8.2
  • WordPress version: 6.3.1
  • First release: Sep 28, 2017
  • Latest release: Dec 7, 2017
  • Number of updates: 31
  • Update frequency: every 2.3 days
  • Top authors: thiagofalencar (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /1,920 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▼1.90MB] [CPU: ▼63.31ms] Passed 4 tests

Analyzing server-side resources used by Woo Braspress
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.10 ▼1.365.14 ▼37.46
Dashboard /wp-admin2.12 ▼1.235.78 ▼56.76
Posts /wp-admin/edit.php2.12 ▼1.245.88 ▼50.41
Add New Post /wp-admin/post-new.php2.12 ▼3.775.84 ▼108.60
Media Library /wp-admin/upload.php2.12 ▼1.117.01 ▼29.69

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 36 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Woo Braspress
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,824 ▲3813.57 ▼0.811.77 ▼0.2545.63 ▼1.97
Dashboard /wp-admin2,230 ▲275.91 ▲1.0199.06 ▼11.7037.37 ▲0.59
Posts /wp-admin/edit.php2,109 ▲92.05 ▲0.0538.82 ▼0.4032.87 ▼5.42
Add New Post /wp-admin/post-new.php1,534 ▼1123.48 ▲0.37626.14 ▼18.7959.99 ▼14.06
Media Library /wp-admin/upload.php1,409 ▲94.25 ▼0.01119.39 ▲11.3748.87 ▼2.96

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • Uninstall procedure had uncaught errors
    • > Notice in wp-content/plugins/woo-braspress/includes/class-wc-braspress.php+172
    Only variables should be passed by reference
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget

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
Good news, no errors were detected

SRP 50% from 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
Please fix the following
  • 6× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Braspress_Shipping_Method' not found in wp-content/plugins/woo-braspress/includes/shipping/class-wc-braspress-rodoviario-fob.php:23
    • > PHP Fatal error
      Trait 'WC_Braspress_Functions' not found in wp-content/plugins/woo-braspress/includes/class-wc-braspress-webservice.php on line 9
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Braspress_Shipping_Method' not found in wp-content/plugins/woo-braspress/includes/shipping/class-wc-braspress-rodoviario.php:23
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Shipping_Method' not found in wp-content/plugins/woo-braspress/includes/abstracts/abstract-wc-braspress-shipping-method.php:47
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Braspress_Shipping_Method' not found in wp-content/plugins/woo-braspress/includes/shipping/class-wc-braspress-aeropress-fob.php:23
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Braspress_Shipping_Method' not found in wp-content/plugins/woo-braspress/includes/shipping/class-wc-braspress-aeropress.php:23

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that need to be fixed:
  • Donate link: Please fix this invalid URI: ""
Please take inspiration from this readme.txt

woo-braspress/woocommerce-braspress.php 85% from 13 tests

This is the main PHP file of "Woo Braspress" version 1.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("woo-braspress.php" instead of "woocommerce-braspress.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected1,219 lines of code in 29 files:
LanguageFilesBlank linesComment linesLines of code
PHP233941,0981,107
Markdown144064
JavaScript310048
CSS2080

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity5.29
▷ Minimum class complexity1.00
▷ Maximum class complexity32.00
Average method complexity1.74
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces1
Traits2
Classes14
▷ Abstract classes17.14%
▷ Concrete classes1392.86%
▷ Final classes00.00%
Methods98
▷ Static methods22.04%
▷ Public methods6061.22%
▷ Protected methods1414.29%
▷ Private methods2424.49%
Functions11
▷ Named functions436.36%
▷ Anonymous functions763.64%
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
No PNG files were detected