78% a3h-pono-rez-activities-and-booking

Code Review | A3H Pono Rez Reservation Interface for WordPress

WordPress plugin A3H Pono Rez Reservation Interface for WordPress scored78%from 54 tests.

About plugin

  • Plugin page: a3h-pono-rez-acti...
  • Plugin version: 2.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.5.3
  • WordPress version: 6.3.1
  • First release: Jan 13, 2016
  • Latest release: Aug 5, 2016
  • Number of updates: 30
  • Update frequency: every 6.8 days
  • Top authors: arnesonium (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,112 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.03MB] [CPU: ▼4.75ms] Passed 4 tests

This is a short check of server-side resources used by A3H Pono Rez Reservation Interface for WordPress
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0338.52 ▼1.54
Dashboard /wp-admin3.34 ▲0.0346.95 ▼5.19
Posts /wp-admin/edit.php3.39 ▲0.0350.42 ▼9.31
Add New Post /wp-admin/post-new.php5.92 ▲0.0395.33 ▼2.94
Media Library /wp-admin/upload.php3.26 ▲0.0334.00 ▲1.06

Server storage [IO: ▲3.30MB] [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: 521 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts
db_upgraded
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for A3H Pono Rez Reservation Interface for WordPress
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,953 ▲16714.01 ▼0.349.43 ▲7.3044.38 ▼7.75
Dashboard /wp-admin2,235 ▲614.91 ▼0.72103.84 ▲11.9142.85 ▲2.60
Posts /wp-admin/edit.php2,122 ▲252.29 ▲0.2647.09 ▲8.4636.84 ▼3.81
Add New Post /wp-admin/post-new.php1,564 ▲1423.24 ▼0.16673.44 ▲33.8237.39 ▼15.59
Media Library /wp-admin/upload.php1,444 ▲444.25 ▲0.0694.06 ▼8.8845.75 ▲0.09

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
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/a3h-pono-rez-activities-and-booking/a3h.php
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/a3h-pono-rez-activities-and-booking/lib/class-ponorezdb.php on line 10
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/a3h-pono-rez-activities-and-booking/lib/class-ponorezdb.php on line 9

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

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
10 plugin tags: reservations, booking calendar, a3h, booking, booking system...

a3h-pono-rez-activities-and-booking/a3h.php 92% from 13 tests

"A3H Pono Rez Reservation Interface for WordPress" version 2.0.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("a3h-pono-rez-activities-and-booking.php" instead of "a3h.php")

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
Everything looks great! No dangerous files found in this plugin38,985 lines of code in 100 files:
LanguageFilesBlank linesComment linesLines of code
CSS731,1041,94435,235
JavaScript155221642,506
PHP93493721,214
HTML2111125
make1435

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity15.50
▷ Minimum class complexity1.00
▷ Maximum class complexity44.00
Average method complexity2.58
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes8100.00%
Methods73
▷ Static methods45.48%
▷ Public methods6386.30%
▷ Protected methods68.22%
▷ Private methods45.48%
Functions7
▷ Named functions571.43%
▷ Anonymous functions228.57%
Constants6
▷ Global constants6100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
341 PNG files occupy 0.91MB with 0.35MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/css/themes/eggplant/images/ui-icons_ebccce_256x240.png4.49KB4.20KB▼ 6.46%
assets/css/themes/overcast/images/ui-bg_flat_55_eeeeee_40x100.png0.27KB0.11KB▼ 57.35%
assets/css/themes/mint-choc/images/ui-icons_ffffff_256x240.png6.20KB4.20KB▼ 32.23%
assets/css/themes/blitzer/images/ui-bg_highlight-hard_100_eeeeee_1x100.png0.30KB0.18KB▼ 39.47%
assets/css/themes/trontastic/images/ui-bg_glass_55_f1fbe5_1x400.png0.39KB0.17KB▼ 57.25%