84% awp-booking-calendar

Code Review | AffiliateWP - Booking Calendar

WordPress plugin AffiliateWP - Booking Calendar scored84%from 54 tests.

About plugin

  • Plugin page: awp-booking-calendar
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7.0-5.1.1
  • WordPress version: 6.3.1
  • First release: Apr 19, 2019
  • Latest release: Apr 19, 2019
  • Number of updates: 9
  • Update frequency: N/A
  • Top authors: qfnetwork (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /791 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

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

A check of server-side resources used by AffiliateWP - Booking Calendar
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0237.72 ▼2.77
Dashboard /wp-admin3.32 ▲0.0146.01 ▼2.59
Posts /wp-admin/edit.php3.37 ▲0.0147.76 ▲2.66
Add New Post /wp-admin/post-new.php5.90 ▲0.0179.45 ▼16.02
Media Library /wp-admin/upload.php3.24 ▲0.0132.26 ▼0.30

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for AffiliateWP - Booking Calendar
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.22 ▼1.151.59 ▼0.1141.32 ▼2.79
Dashboard /wp-admin2,209 ▲184.86 ▼0.0699.32 ▼16.6839.53 ▼7.51
Posts /wp-admin/edit.php2,092 ▼02.02 ▼0.0339.31 ▲0.5336.00 ▲3.73
Add New Post /wp-admin/post-new.php1,531 ▲918.12 ▼4.96604.63 ▼76.9552.03 ▼1.81
Media Library /wp-admin/upload.php1,388 ▲34.20 ▼0.01100.63 ▼7.0542.58 ▼5.89

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded

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
Even though no errors were found, this is by no means an exhaustive test

SRP 50% 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 trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'Affiliate_WP_Base' not found in wp-content/plugins/awp-booking-calendar/includes/integrations/class-booking-calendar.php:3

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)
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need your attention:
  • Requires php: Version not formatted correctly
You can look at the official readme.txt

awp-booking-calendar/affiliate-wp-booking-calendar.php 92% from 13 tests

This is the main PHP file of "AffiliateWP - Booking Calendar" version 1.0.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("awp-booking-calendar.php" instead of "affiliate-wp-booking-calendar.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin126 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP25045121
Markdown1405

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity18.00
▷ Minimum class complexity18.00
▷ Maximum class complexity18.00
Average method complexity5.25
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions00.00%
▷ Anonymous functions4100.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
There are no PNG files in this plugin