10% hexagonal-reviews

Code Review | Hexagonal Reviews

WordPress plugin Hexagonal Reviews scored 10% from 54 tests.

About plugin

  • Plugin page: hexagonal-reviews
  • Plugin version: 1.2.12
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-5.9
  • WordPress version: 5.9.2
  • First release: Jan 1, 2021
  • Latest release: Mar 7, 2022
  • Number of updates: 35
  • Update frequency: every 12.3 days
  • Top authors: warguns86 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 292 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
These installer errors require your attention
  • This plugin did not install gracefully
    • > Notice in wp-content/plugins/hexagonal-reviews/src/Shared/Infrastructure/Persistence/Wordpress/Migration/Migration1624304009.php+75
    Undefined index: total

Server metrics [RAM: ▲0.37MB] [CPU: ▼292.66ms] Passed 4 tests

Server-side resources used by Hexagonal Reviews
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.92 ▲0.4057.42 ▲7.91
Dashboard /wp-admin3.77 ▲0.3637.98 ▲4.64
Posts /wp-admin/edit.php4.05 ▲0.4143.59 ▲5.40
Add New Post /wp-admin/post-new.php7.29 ▲0.3299.64 ▼1,184.09
Media Library /wp-admin/upload.php3.71 ▲0.4227.03 ▲3.41
Reviews /wp-admin/admin.php?page=reviews3.7633.01
Edit Review /wp-admin/admin.php?page=edit-review3.7231.53
Reviews Shortcut Generator /wp-admin/admin.php?page=reviews-shortcut-generator3.6925.52

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 294 new files
Database: 2 new tables, 1 new option
New tables
wp_hexagonal_review
wp_hexagonal_review_average
New WordPress options
hexagonal-reviews-version

Browser metrics Passed 4 tests

Hexagonal Reviews: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,813 ▲9115.53 ▼0.105.97 ▲0.212.35 ▼0.31
Dashboard /wp-admin2,909 ▲516.07 ▼0.08118.94 ▼17.68154.51 ▼7.57
Posts /wp-admin/edit.php2,729 ▲413.25 ▲0.0262.86 ▲0.17137.49 ▼1.85
Add New Post /wp-admin/post-new.php1,687 ▲1916.07 ▼3.76426.01 ▼16.11161.27 ▲3.94
Media Library /wp-admin/upload.php1,736 ▲385.49 ▲0.06140.54 ▼4.48186.43 ▼6.48
Reviews /wp-admin/admin.php?page=reviews1,3502.4161.16134.29
Edit Review /wp-admin/admin.php?page=edit-review1,2052.4355.9597.64
Reviews Shortcut Generator /wp-admin/admin.php?page=reviews-shortcut-generator1,1802.3755.06124.39

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 1 option in the database
    • hexagonal-reviews-version

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following items
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/hexagonal-reviews/src/UI/Wordpress/Front/templates/GetReviewsBlock.php
  • 127× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Brick\\Math\\BigNumber' not found in wp-content/plugins/hexagonal-reviews/vendor/brick/math/src/BigInteger.php:22
    • > PHP Notice
      Undefined variable: avg_visible in wp-content/plugins/hexagonal-reviews/src/UI/Wordpress/Front/templates/GetReviewsBlock.php on line 38
    • > PHP Fatal error
      Uncaught Error: Class 'Ramsey\\Uuid\\Uuid' not found in wp-content/plugins/hexagonal-reviews/vendor/ramsey/uuid/src/Nonstandard/UuidV6.php:46
    • > PHP Fatal error
      Uncaught Error: Interface 'Ramsey\\Uuid\\Type\\TypeInterface' not found in wp-content/plugins/hexagonal-reviews/vendor/ramsey/uuid/src/Type/Time.php:35
    • > PHP Fatal error
      Uncaught Error: Class 'Ramsey\\Collection\\Map\\AbstractMap' not found in wp-content/plugins/hexagonal-reviews/vendor/ramsey/collection/src/Map/NamedParameterMap.php:31
    • > PHP Fatal error
      Uncaught Error: Class 'Ramsey\\Collection\\AbstractArray' not found in wp-content/plugins/hexagonal-reviews/vendor/ramsey/collection/src/Map/AbstractMap.php:32
    • > PHP Fatal error
      Uncaught Error: Interface 'Ramsey\\Uuid\\Exception\\UuidExceptionInterface' not found in wp-content/plugins/hexagonal-reviews/vendor/ramsey/uuid/src/Exception/InvalidArgumentException.php:22
    • > PHP Fatal error
      Uncaught Error: Class 'Ramsey\\Collection\\Map\\AbstractTypedMap' not found in wp-content/plugins/hexagonal-reviews/vendor/ramsey/collection/src/Map/TypedMap.php:87
    • > PHP Fatal error
      Uncaught Error: Interface 'Ramsey\\Uuid\\Exception\\UuidExceptionInterface' not found in wp-content/plugins/hexagonal-reviews/vendor/ramsey/uuid/src/Exception/UnableToBuildUuidException.php:22
    • > PHP Fatal error
      Uncaught Error: Interface 'Ramsey\\Uuid\\Generator\\TimeGeneratorInterface' not found in wp-content/plugins/hexagonal-reviews/vendor/ramsey/uuid/src/Generator/DefaultTimeGenerator.php:41

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 Passed 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
4 plugin tags: reviews, review, hexagonal, clean

hexagonal-reviews/hexagonal-reviews.php Passed 13 tests

The main PHP script in "Hexagonal Reviews" version 1.2.12 is automatically included on every request by WordPress
33 characters long description:
The Wp Reviews you always desired

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
Good job! No executable or dangerous file extensions detected14,480 lines of code in 276 files:
LanguageFilesBlank linesComment linesLines of code
PHP2473,44411,13611,142
Markdown1262101,542
JSON10001,060
PO File3214301494
CSS2270158
XML211184

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity5.19
▷ Minimum class complexity1.00
▷ Maximum class complexity89.00
Average method complexity1.97
▷ Minimum method complexity1.00
▷ Maximum method complexity20.00
Code structure
Namespaces68
Interfaces40
Traits8
Classes180
▷ Abstract classes73.89%
▷ Concrete classes17396.11%
▷ Final classes7744.51%
Methods1,090
▷ Static methods11010.09%
▷ Public methods99991.65%
▷ Protected methods181.65%
▷ Private methods736.70%
Functions81
▷ Named functions4859.26%
▷ Anonymous functions3340.74%
Constants107
▷ Global constants21.87%
▷ Class constants10598.13%
▷ Public constants8580.95%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There were not PNG files found in your plugin