88% buyblo-box

Code Review | BuyBlo Box

WordPress plugin BuyBlo Box scored 88% from 54 tests.

About plugin

  • Plugin page: buyblo-box
  • Plugin version: 1.2.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.9.5
  • WordPress version: 5.9.2
  • First release: May 19, 2017
  • Latest release: Apr 20, 2018
  • Number of updates: 15
  • Update frequency: every 22.8 days
  • Top authors: buyblo (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 841 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.25MB] [CPU: ▼290.47ms] Passed 4 tests

This is a short check of server-side resources used by BuyBlo Box
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.74 ▲0.2254.61 ▲4.00
Dashboard /wp-admin3.69 ▲0.2836.75 ▲3.96
Posts /wp-admin/edit.php3.91 ▲0.2739.52 ▲1.94
Add New Post /wp-admin/post-new.php7.22 ▲0.2597.91 ▼1,167.22
Media Library /wp-admin/upload.php3.64 ▲0.3424.92 ▼0.54
BuyBlo Box /wp-admin/options-general.php?page=buyblo-box-config3.7126.52

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 948 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

BuyBlo Box: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,938 ▲19416.36 ▲0.548.81 ▲2.852.61 ▲0.32
Dashboard /wp-admin2,924 ▲736.20 ▲0.03116.96 ▼22.29156.63 ▼4.24
Posts /wp-admin/edit.php2,688 ▼33.24 ▲0.0165.30 ▲0.13139.84 ▼4.02
Add New Post /wp-admin/post-new.php1,724 ▲3416.69 ▼4.15432.41 ▼7.28195.89 ▲36.57
Media Library /wp-admin/upload.php1,729 ▲315.77 ▲0.23125.37 ▼19.63187.81 ▼0.59
BuyBlo Box /wp-admin/options-general.php?page=buyblo-box-config1,1522.6554.43127.55

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Uninstall script ran successfully

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 0% 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
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/buyblo-box/buyblo-box.php
  • 637× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Twig_BaseNodeVisitor' not found in wp-content/plugins/buyblo-box/vendor/twig/twig/lib/Twig/NodeVisitor/Escaper.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'Twig_Extension' not found in wp-content/plugins/buyblo-box/vendor/twig/twig/lib/Twig/Extension/Optimizer.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'Nokaut\\ApiKitBB\\Ext\\Data\\Collection\\Filters\\PropertyAbstract' not found in wp-content/plugins/buyblo-box/vendor/nokaut/api-kit/src/Ext/Data/Collection/Filters/PropertyValues.php:5
    • > PHP Fatal error
      Uncaught Error: Interface 'Twig_LoaderInterface' not found in wp-content/plugins/buyblo-box/vendor/twig/twig/lib/Twig/Loader/Chain.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'Twig_Node_Expression_Binary' not found in wp-content/plugins/buyblo-box/vendor/twig/twig/lib/Twig/Node/Expression/Binary/Range.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'Twig_Node_Expression_Unary' not found in wp-content/plugins/buyblo-box/vendor/twig/twig/lib/Twig/Node/Expression/Unary/Neg.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'Nokaut\\ApiKitBB\\ClientApi\\Rest\\Query\\QueryBuilderAbstract' not found in wp-content/plugins/buyblo-box/vendor/nokaut/api-kit/src/ClientApi/Rest/Query/ProductsQuery.php:14
    • > PHP Fatal error
      Uncaught Error: Interface 'Guzzle\\Common\\HasDispatcherInterface' not found in wp-content/plugins/buyblo-box/vendor/guzzle/guzzle/src/Guzzle/Common/AbstractHasDispatcher.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'Nokaut\\ApiKitBB\\Converter\\ProductConverter' not found in wp-content/plugins/buyblo-box/vendor/nokaut/api-kit/src/Converter/ProductWithBestOfferConverter.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'Twig_Node_Expression_Binary' not found in wp-content/plugins/buyblo-box/vendor/twig/twig/lib/Twig/Node/Expression/Binary/Less.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: Please add images for these screenshots: #1 (Konfiguracja pluginu. (Plugin configuration.)), #2 (Dodawanie produktów w edycji posta. (Adding products to post.)), #3 (Widok posta z produktami. (Post view with products.))
The official readme.txt might help

buyblo-box/buyblo-box.php Passed 13 tests

Analyzing the main PHP file in "BuyBlo Box" version 1.2.2
61 characters long description:
BuyBlo.com provides product boxes for your wordpress website.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin48,476 lines of code in 918 files:
LanguageFilesBlank linesComment linesLines of code
PHP83610,14522,62541,113
Markdown1034401,496
JSON31801,324
Sass120841,150
JavaScript61372887
C1172184859
Twig10630622
CSS31050473
XML113613320
Ant2281143
YAML315159
C/C++ Header171315
reStructuredText1519
m41215
SVG1001

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity5.97
▷ Minimum class complexity1.00
▷ Maximum class complexity147.00
Average method complexity1.97
▷ Minimum method complexity1.00
▷ Maximum method complexity66.00
Code structure
Namespaces139
Interfaces105
Traits2
Classes722
▷ Abstract classes446.09%
▷ Concrete classes67893.91%
▷ Final classes20.29%
Methods4,382
▷ Static methods2064.70%
▷ Public methods3,82487.27%
▷ Protected methods44510.16%
▷ Private methods1132.58%
Functions138
▷ Named functions5338.41%
▷ Anonymous functions8561.59%
Constants195
▷ Global constants115.64%
▷ Class constants18494.36%
▷ Public constants184100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
4 PNG files occupy 1.04MB with 0.55MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png349.93KB115.25KB▼ 67.07%
assets/images/search_icons.png1.40KB1.59KB0.00%
screenshot-3.png635.32KB190.95KB▼ 69.94%
screenshot-1.png81.52KB22.46KB▼ 72.45%