78% frisbo-woocommerce

Code Review | Frisbo eFulfillment

WordPress plugin Frisbo eFulfillment scored78%from 54 tests.

About plugin

  • Plugin page: frisbo-woocommerce
  • Plugin version: 2.1.13
  • PHP compatiblity: 7.1+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.9
  • WordPress version: 6.3.1
  • First release: Nov 5, 2018
  • Latest release: Nov 8, 2023
  • Number of updates: 136
  • Update frequency: every 13.5 days
  • Top authors: tudorbarbu (45.59%)frisbo (28.68%)filipblajiu (24.26%)costinfrisbo (3.68%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /5,392 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.66MB] [CPU: ▼12.18ms] Passed 4 tests

Server-side resources used by Frisbo eFulfillment
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /4.83 ▲1.3644.94 ▲0.14
Dashboard /wp-admin4.66 ▲1.3152.02 ▼9.20
Posts /wp-admin/edit.php4.78 ▲1.4250.05 ▲2.46
Add New Post /wp-admin/post-new.php4.52 ▼1.3843.91 ▼42.13
Media Library /wp-admin/upload.php4.59 ▲1.3545.25 ▲12.08

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 1,286 new files
Database: no new tables, 8 new options
New WordPress options
recovery_mode_email_last_sent
theysaidso_admin_options
db_upgraded
widget_recent-comments
remove-frisbo-id-from-variable-products
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Frisbo eFulfillment
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,808 ▲4614.13 ▼0.221.54 ▼0.1537.52 ▼5.36
Dashboard /wp-admin2,213 ▲335.69 ▲0.0384.28 ▼2.0882.80 ▲39.77
Posts /wp-admin/edit.php2,119 ▲192.02 ▲0.0435.19 ▲0.3834.04 ▼0.90
Add New Post /wp-admin/post-new.php45 ▼1,4810.41 ▼22.660.08 ▼667.199.50 ▼55.37
Media Library /wp-admin/upload.php1,418 ▲154.11 ▼0.05118.40 ▲10.3350.44 ▲1.98

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 8 options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • remove-frisbo-id-from-variable-products
    • recovery_mode_email_last_sent
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 0% 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
Please fix the following
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/frisbo-woocommerce/tests/phpunit/bootstrap.php
  • 401× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Twig\ode\\Expression\\Unary\\AbstractUnary' not found in wp-content/plugins/frisbo-woocommerce/vendor/twig/twig/src/Node/Expression/Unary/PosUnary.php:17
    • > PHP Fatal error
      Uncaught Error: Interface 'Monolog\\Handler\\HandlerInterface' not found in wp-content/plugins/frisbo-woocommerce/vendor/monolog/monolog/src/Monolog/Handler/AbstractHandler.php:24
    • > PHP Fatal error
      Uncaught Error: Class 'Twig\ode\\Expression\\AbstractExpression' not found in wp-content/plugins/frisbo-woocommerce/vendor/twig/twig/src/Node/Expression/NameExpression.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/frisbo-woocommerce/vendor/twig/twig/test/Twig/Tests/ParserTest.php:22
    • > PHP Fatal error
      Uncaught Error: Class 'Twig\ode\\Expression\\AbstractExpression' not found in wp-content/plugins/frisbo-woocommerce/vendor/twig/twig/src/Node/Expression/ArrowFunctionExpression.php:22
    • > PHP Fatal error
      Uncaught Error: Class 'Twig\\Test\odeTestCase' not found in wp-content/plugins/frisbo-woocommerce/vendor/twig/twig/test/Twig/Tests/Node/IfTest.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'Twig\\Test\odeTestCase' not found in wp-content/plugins/frisbo-woocommerce/vendor/twig/twig/test/Twig/Tests/Node/BlockReferenceTest.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'Twig\\Sandbox\\SecurityError' not found in wp-content/plugins/frisbo-woocommerce/vendor/twig/twig/src/Sandbox/SecurityNotAllowedMethodError.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'Twig\ode\\Expression\\AbstractExpression' not found in wp-content/plugins/frisbo-woocommerce/vendor/twig/twig/src/Node/Expression/TempNameExpression.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'Twig\ode\ode' not found in wp-content/plugins/frisbo-woocommerce/vendor/twig/twig/src/Node/ForLoopNode.php:21

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 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
Attributes that need to be fixed:
  • Contributors: Plugin contributors not specified
You can look at the official readme.txt

frisbo-woocommerce/frisbo-woocommerce.php 92% from 13 tests

The main PHP script in "Frisbo eFulfillment" version 2.1.13 is automatically included on every request by WordPress
It is important to 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 97% from 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
Success! There were no dangerous files found in this plugin68,021 lines of code in 915 files:
LanguageFilesBlank linesComment linesLines of code
PHP7489,53217,67757,282
Markdown191,55104,331
reStructuredText952,5102,2653,406
JSON1500944
C1171186860
Twig1162408
CSS1680347
JavaScript13313177
YAML6303127
Bourne Shell16045
XML24138
HTML110017
C/C++ Header171315
Dockerfile18010
make1409
m41215

PHP code 50% from 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
These items need your attention
  • Cyclomatic complexity of methods has to be reduced to less than 100 (currently 179)
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity6.95
▷ Minimum class complexity1.00
▷ Maximum class complexity179.00
Average method complexity2.53
▷ Minimum method complexity1.00
▷ Maximum method complexity179.00
Code structure
Namespaces54
Interfaces54
Traits10
Classes694
▷ Abstract classes253.60%
▷ Concrete classes66996.40%
▷ Final classes314.63%
Methods3,042
▷ Static methods2337.66%
▷ Public methods2,43980.18%
▷ Protected methods2859.37%
▷ Private methods31810.45%
Functions294
▷ Named functions15954.08%
▷ Anonymous functions13545.92%
Constants349
▷ Global constants9527.22%
▷ Class constants25472.78%
▷ Public constants254100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
2 PNG files occupy 0.31MB with 0.17MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/icon-256x256.png11.23KB4.85KB▼ 56.83%
assets/banner-772x250.png307.88KB156.04KB▼ 49.32%