84% arrivala-online-business-reviews

Code Review | Arrivala - Online Business Reviews

WordPress plugin Arrivala - Online Business Reviews scored84%from 54 tests.

About plugin

  • Plugin page: arrivala-online-b...
  • Plugin version: 2.3.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-6.0
  • WordPress version: 6.3.1
  • First release: Jan 12, 2019
  • Latest release: Jun 23, 2022
  • Number of updates: 37
  • Update frequency: every 34.0 days
  • Top authors: arrivala (100%)

Code review

54 tests

User reviews

1 review

Install metrics

80+ active /1,575 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

Server metrics [RAM: ▲3.27MB] [CPU: ▲15.87ms] Passed 4 tests

A check of server-side resources used by Arrivala - Online Business Reviews
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /6.55 ▲3.0961.67 ▲20.88
Dashboard /wp-admin6.67 ▲3.3766.99 ▲14.54
Posts /wp-admin/edit.php6.70 ▲3.3475.12 ▲26.26
Add New Post /wp-admin/post-new.php9.22 ▲3.33103.46 ▲1.78
Media Library /wp-admin/upload.php6.53 ▲3.3064.84 ▲32.49
Field Groups /wp-admin/edit.php?post_type=acf-field-group6.6555.49
Add New /wp-admin/post-new.php?post_type=acf-field-group6.7468.14
Tools /wp-admin/edit.php?post_type=acf-field-group&page=acf-tools6.5758.24

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 247 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
db_upgraded
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
acf_version

Browser metrics Passed 4 tests

An overview of browser requirements for Arrivala - Online Business Reviews
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,875 ▲12914.11 ▼0.251.96 ▲0.2240.19 ▼2.92
Dashboard /wp-admin2,284 ▲1075.95 ▲0.38103.78 ▲17.7038.57 ▲1.97
Posts /wp-admin/edit.php2,187 ▲843.13 ▲1.1348.39 ▲5.8534.78 ▼4.40
Add New Post /wp-admin/post-new.php1,609 ▲8323.16 ▼0.35736.91 ▲83.2636.98 ▼12.22
Media Library /wp-admin/upload.php1,498 ▲955.49 ▲1.25107.25 ▲3.9843.49 ▲1.95
Field Groups /wp-admin/edit.php?post_type=acf-field-group1,2593.1742.6134.77
Add New /wp-admin/post-new.php?post_type=acf-field-group2,2173.5869.6949.70
Tools /wp-admin/edit.php?post_type=acf-field-group&page=acf-tools1,0772.8838.7932.57

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • acf_version
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

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
Almost there! Just fix the following items
  • 79× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function acf_register_store() in wp-content/plugins/arrivala-online-business-reviews/vendor/advanced-custom-fields/includes/acf-helper-functions.php:128
    • > PHP Fatal error
      Uncaught Error: Class 'acf_field' not found in wp-content/plugins/arrivala-online-business-reviews/vendor/advanced-custom-fields/includes/fields/class-acf-field-date_picker.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function acf_get_location_rule_types() in wp-content/plugins/arrivala-online-business-reviews/vendor/advanced-custom-fields/includes/admin/views/html-location-rule.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/arrivala-online-business-reviews/vendor/advanced-custom-fields/includes/forms/form-taxonomy.php:36
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/arrivala-online-business-reviews/vendor/advanced-custom-fields/includes/admin/settings-info.php:21
    • > PHP Fatal error
      Uncaught Error: Class 'acf_field' not found in wp-content/plugins/arrivala-online-business-reviews/vendor/advanced-custom-fields/includes/fields/class-acf-field-taxonomy.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/arrivala-online-business-reviews/vendor/advanced-custom-fields/includes/admin/views/settings-addons.php:3
    • > PHP Notice
      Undefined variable: field in wp-content/plugins/arrivala-online-business-reviews/vendor/advanced-custom-fields/includes/admin/views/field-group-field.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/arrivala-online-business-reviews/vendor/advanced-custom-fields/includes/api/api-template.php:928
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/arrivala-online-business-reviews/vendor/advanced-custom-fields/includes/admin/views/settings-info.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
2 plugin tags: business reviews, online reviews

arrivala-online-business-reviews/arrivala-embed.php 92% from 13 tests

The main file in "Arrivala - Online Business Reviews" v. 2.3.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please take the time to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("arrivala-online-business-reviews.php" instead of "arrivala-embed.php")

Code Analysis Passed 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
Everything looks great! No dangerous files found in this plugin90,709 lines of code in 197 files:
LanguageFilesBlank linesComment linesLines of code
PO File3123,27838,17548,880
JavaScript126,6796,60522,217
PHP14012,61220,13317,827
CSS11208601,617
JSON100124
SVG118030
Markdown111014

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity12.11
▷ Minimum class complexity1.00
▷ Maximum class complexity55.00
Average method complexity2.67
▷ Minimum method complexity1.00
▷ Maximum method complexity24.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes105
▷ Abstract classes00.00%
▷ Concrete classes105100.00%
▷ Final classes00.00%
Methods699
▷ Static methods00.00%
▷ Public methods699100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions547
▷ Named functions547100.00%
▷ Anonymous functions00.00%
Constants8
▷ Global constants8100.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
7 compressed PNG files occupy 0.02MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
vendor/advanced-custom-fields/assets/inc/datepicker/images/ui-icons_DDDDDD_256x240.png3.68KB4.17KB0.00%
vendor/advanced-custom-fields/assets/inc/datepicker/images/ui-icons_444444_256x240.png3.68KB4.17KB0.00%
vendor/advanced-custom-fields/assets/inc/select2/3/select2x2.png0.64KB0.77KB0.00%
vendor/advanced-custom-fields/assets/inc/datepicker/images/ui-icons_ffffff_256x240.png3.68KB4.17KB0.00%
vendor/advanced-custom-fields/assets/inc/datepicker/images/ui-bg_highlight-soft_0_ffffff_1x100.png0.08KB0.08KB0.00%