83% orioly-book-now

Code Review | Orioly Book Now Plugin

WordPress plugin Orioly Book Now Plugin scored 83% from 54 tests.

About plugin

  • Plugin page: orioly-book-now
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2-4.7
  • WordPress version: 6.3.1
  • First release: Aug 8, 2016
  • Latest release: Oct 18, 2016
  • Number of updates: 9
  • Update frequency: every 15.2 days
  • Top authors: orioly (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active / 1,562 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.08MB] [CPU: ▼5.93ms] Passed 4 tests

An overview of server-side resources used by Orioly Book Now Plugin
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0837.40 ▼6.16
Dashboard /wp-admin3.38 ▲0.0843.78 ▼9.06
Posts /wp-admin/edit.php3.50 ▲0.1447.26 ▼3.15
Add New Post /wp-admin/post-new.php5.98 ▲0.1095.54 ▼5.35
Media Library /wp-admin/upload.php3.31 ▲0.0835.83 ▼0.14
Orioly Book Now /wp-admin/options-general.php?page=orioly3.2732.52

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 21 new files
Database: 1 new table, 6 new options
New tables
wp_orioly_data
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
db_upgraded
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for Orioly Book Now Plugin
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,818 ▲8313.29 ▼1.495.14 ▲3.4243.80 ▼18.95
Dashboard /wp-admin2,224 ▲365.86 ▼0.02106.69 ▼0.1138.46 ▲0.74
Posts /wp-admin/edit.php2,109 ▲202.02 ▲0.0536.70 ▼0.9132.16 ▼4.39
Add New Post /wp-admin/post-new.php1,531 ▲1223.21 ▲0.02604.90 ▼118.2160.61 ▼14.68
Media Library /wp-admin/upload.php1,403 ▲154.44 ▲0.22103.73 ▼6.7842.20 ▼6.97
Orioly Book Now /wp-admin/options-general.php?page=orioly8542.1926.4326.08

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
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

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
The following issues need your attention
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/orioly-book-now/admin/partials/orioly-admin-display.php:15

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 88% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Please fix the following attributes:
  • Screenshots: These screenshots do not have images: #1 (**First screenshot** shows you a settings page where you need you need to place your API key.), #2 (**Orioly shortcode in action.** Use the top button (above your page/post editor) to add a new button to your site.), #3 (**Select the activity** for which you want to add a booking button.), #4 (**Check your button in action**, placed in same sample blog post.)
  • Plugin Name: You should set the name of your plugin on the first line ( === orioly-book-now === )
You can take inspiration from this readme.txt

orioly-book-now/orioly.php 77% from 13 tests

The principal PHP file in "Orioly Book Now Plugin" v. 1.0.1 is loaded by WordPress automatically on each request
The following require your attention:
  • Description: The description should be shorter than 140 characters (currently 152 characters long)
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("orioly-book-now.php" instead of "orioly.php")
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
No dangerous file extensions were detected496 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
PHP11135392441
JavaScript15037
CSS16018

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.09
Average class complexity2.25
▷ Minimum class complexity1.00
▷ Maximum class complexity8.00
Average method complexity1.25
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes112.50%
▷ Concrete classes787.50%
▷ Final classes00.00%
Methods40
▷ Static methods1230.00%
▷ Public methods3280.00%
▷ Protected methods12.50%
▷ Private methods717.50%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
3 PNG files occupy 0.41MB with 0.26MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot3.png207.62KB71.57KB▼ 65.53%
assets/screenshot2.png117.82KB43.69KB▼ 62.92%
assets/screenshot1.png91.21KB33.72KB▼ 63.03%