84% penny-black

Code Review | Penny Black integration for WooCommerce

WordPress plugin Penny Black integration for WooCommerce scored84%from 54 tests.

About plugin

  • Plugin page: penny-black
  • Plugin version: 1.2.3
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 7.1-6.3.1
  • WordPress version: 6.3.1
  • First release: Sep 19, 2023
  • Latest release: Sep 19, 2023
  • Number of updates: 14
  • Update frequency: every 0.4 days
  • Top authors: pennyblackengineers (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /74 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 gracefully, with no errors

Server metrics [RAM: ▲0.18MB] [CPU: ▼1.01ms] Passed 4 tests

Server-side resources used by Penny Black integration for WooCommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.62 ▲0.1643.40 ▲4.67
Dashboard /wp-admin3.49 ▲0.1952.63 ▲2.76
Posts /wp-admin/edit.php3.60 ▲0.2549.62 ▲1.50
Add New Post /wp-admin/post-new.php6.07 ▲0.1989.09 ▼11.72
Media Library /wp-admin/upload.php3.41 ▲0.1840.34 ▲3.42

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Penny Black integration for WooCommerce
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.29 ▼1.091.84 ▼0.1143.00 ▼0.27
Dashboard /wp-admin2,206 ▲575.86 ▲0.25110.96 ▲9.5943.96 ▲4.34
Posts /wp-admin/edit.php2,089 ▼02.00 ▼0.0635.80 ▼0.6432.67 ▼5.29
Add New Post /wp-admin/post-new.php1,533 ▼1223.43 ▲5.19687.18 ▲34.3863.17 ▲3.75
Media Library /wp-admin/upload.php1,388 ▼04.17 ▼0.0498.72 ▼12.2144.67 ▼2.78

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not 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
  • 70× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/penny-black/vendor/guzzlehttp/psr7/src/NoSeekStream.php:12
    • > PHP Warning
      include(wp-content/plugins/penny-black/vendor/pennyblack/php-sdk/example/../vendor/autoload.php): failed to open stream: No such file or directory in wp-content/plugins/penny-black/vendor/pennyblack/php-sdk/example/SendOrderExample.php on line 3
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\MessageInterface' not found in wp-content/plugins/penny-black/vendor/psr/http-message/src/RequestInterface.php:24
    • > PHP Fatal error
      Uncaught Error: Class 'GuzzleHttp\\Exception\\RequestException' not found in wp-content/plugins/penny-black/vendor/guzzlehttp/guzzle/src/Exception/BadResponseException.php:11
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\BodySummarizerInterface' not found in wp-content/plugins/penny-black/vendor/guzzlehttp/guzzle/src/BodySummarizer.php:7
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\ResponseInterface' not found in wp-content/plugins/penny-black/vendor/guzzlehttp/psr7/src/Response.php:13
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\Promise\\PromisorInterface' not found in wp-content/plugins/penny-black/vendor/guzzlehttp/guzzle/src/Pool.php:24
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\Cookie\\CookieJarInterface' not found in wp-content/plugins/penny-black/vendor/guzzlehttp/guzzle/src/Cookie/CookieJar.php:11
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\Promise\\PromiseInterface' not found in wp-content/plugins/penny-black/vendor/guzzlehttp/promises/src/FulfilledPromise.php:15
    • > PHP Warning
      include(): Failed opening 'wp-content/plugins/penny-black/vendor/pennyblack/php-sdk/example/../vendor/autoload.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/penny-black/vendor/pennyblack/php-sdk/example/GetOrderPrintExample.php on line 3

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
9 plugin tags: personalisation, pennyblack, woo, prints, marketing...

penny-black/penny-black.php 92% from 13 tests

This is the main PHP file of "Penny Black integration for WooCommerce" version 1.2.3, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Requires at least: The required version number did not match the one declared in readme.txt ("6.0" instead of "7.1")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
No dangerous file extensions were detected17,529 lines of code in 183 files:
LanguageFilesBlank linesComment linesLines of code
PHP1472,5465,77412,114
Markdown211,54504,156
JSON11001,184
XML211046
YAML22029

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity11.79
▷ Minimum class complexity1.00
▷ Maximum class complexity99.00
Average method complexity2.61
▷ Minimum method complexity1.00
▷ Maximum method complexity27.00
Code structure
Namespaces22
Interfaces26
Traits3
Classes100
▷ Abstract classes00.00%
▷ Concrete classes100100.00%
▷ Final classes3535.00%
Methods865
▷ Static methods15017.34%
▷ Public methods73384.74%
▷ Protected methods40.46%
▷ Private methods12814.80%
Functions108
▷ Named functions1211.11%
▷ Anonymous functions9688.89%
Constants80
▷ Global constants00.00%
▷ Class constants80100.00%
▷ Public constants6378.75%

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
There are no PNG files in this plugin