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

Code Review | A3H Pono Rez Reservation Interface for WordPress

WordPress plugin A3H Pono Rez Reservation Interface for WordPress scored 88% 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: 5.9.2
  • 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 / 889 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.01MB] [CPU: ▼297.84ms] Passed 4 tests

Analyzing server-side resources used by A3H Pono Rez Reservation Interface for WordPress
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0256.20 ▲8.20
Dashboard /wp-admin3.45 ▲0.0534.45 ▼0.44
Posts /wp-admin/edit.php3.68 ▲0.0438.93 ▲1.30
Add New Post /wp-admin/post-new.php6.92 ▼0.0596.06 ▼1,189.26
Media Library /wp-admin/upload.php3.33 ▲0.0325.23 ▼2.94

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 521 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

An overview of browser requirements for A3H Pono Rez Reservation Interface for WordPress
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,987 ▲23317.11 ▲1.149.61 ▲4.012.52 ▼0.80
Dashboard /wp-admin2,931 ▲706.60 ▲0.41133.73 ▼0.17164.27 ▲9.61
Posts /wp-admin/edit.php2,699 ▲53.54 ▲0.3169.06 ▲7.37138.20 ▼0.85
Add New Post /wp-admin/post-new.php1,699 ▲3816.87 ▲0.85391.96 ▼40.75187.53 ▲32.70
Media Library /wp-admin/upload.php1,741 ▲435.87 ▲0.33139.48 ▲0.40203.15 ▲14.74

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Uninstall script ran successfully

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

SRP 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Almost there! Just fix the following items
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/a3h-pono-rez-activities-and-booking/a3h.php
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > 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
    • > 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

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
10 plugin tags: booking, rentals, booking calendar, reservation calendar, booking system...

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

The main PHP script in "A3H Pono Rez Reservation Interface for WordPress" version 2.0.0 is automatically included on every request by WordPress
You should first fix the following items:
  • Main file name: Name the main plugin file 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
There were no executable 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

This is a very shot review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
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

All PNG images should be compressed to minimize bandwidth usage for end users
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/cupertino/images/ui-bg_highlight-soft_25_ffef8f_1x100.png0.35KB0.20KB▼ 44.60%
assets/css/themes/flick/images/ui-bg_flat_0_aaaaaa_40x100.png0.26KB0.11KB▼ 56.06%
assets/css/themes/mint-choc/images/ui-icons_9bcc60_256x240.png4.49KB4.20KB▼ 6.46%
assets/css/themes/dark-hive/images/ui-bg_highlight-soft_33_003147_1x100.png0.39KB0.21KB▼ 46.04%
assets/css/themes/vader/images/ui-icons_cccccc_256x240.png6.87KB4.20KB▼ 38.85%