78% 8-degree-availability-calendar

Code Review | 8 Degree Availability Calendar

WordPress plugin 8 Degree Availability Calendar scored 78% from 54 tests.

About plugin

  • Plugin page: 8-degree-availabi...
  • Plugin version: 1.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-4.9.4
  • WordPress version: 6.3.1
  • First release: Oct 13, 2015
  • Latest release: Aug 10, 2018
  • Number of updates: 18
  • Update frequency: every 57.9 days
  • Top authors: 8degreethemes (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

400+ active / 27,227 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.07MB] [CPU: ▼4.11ms] Passed 4 tests

Analyzing server-side resources used by 8 Degree Availability Calendar
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0843.45 ▲4.15
Dashboard /wp-admin3.37 ▲0.0746.95 ▼0.57
Posts /wp-admin/edit.php3.49 ▲0.1348.31 ▼3.96
Add New Post /wp-admin/post-new.php5.96 ▲0.0792.75 ▼11.31
Media Library /wp-admin/upload.php3.30 ▲0.0736.61 ▼0.61

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 47 new files
Database: no new tables, 8 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
widget_edac_widget
db_upgraded
edac_settings
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for 8 Degree Availability Calendar
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,913 ▲17814.85 ▲0.4815.95 ▲14.2942.40 ▲0.47
Dashboard /wp-admin2,224 ▲364.87 ▼0.01106.79 ▼7.2043.88 ▲3.81
Posts /wp-admin/edit.php2,107 ▲182.06 ▲0.0939.98 ▼1.0835.55 ▲0.33
Add New Post /wp-admin/post-new.php1,542 ▲2223.31 ▲0.29680.10 ▲9.3354.31 ▲0.56
Media Library /wp-admin/upload.php1,406 ▲184.22 ▼0.0193.30 ▼23.8642.34 ▼5.85

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: 8 options
    • widget_recent-posts
    • theysaidso_admin_options
    • edac_settings
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_edac_widget
    • widget_recent-comments
    • db_upgraded

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
Even though everything seems fine, this is not an exhaustive test

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
The following issues need your attention
  • 6× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/8-degree-availability-calendar/inc/backend/widget.php
    • > /wp-content/plugins/8-degree-availability-calendar/inc/backend/blocks/calendar.php
    • > /wp-content/plugins/8-degree-availability-calendar/inc/backend/save-settings.php
    • > /wp-content/plugins/8-degree-availability-calendar/inc/frontend/shortcode.php
    • > /wp-content/plugins/8-degree-availability-calendar/inc/backend/blocks/settings.php
    • > /wp-content/plugins/8-degree-availability-calendar/8degree-availability-calendar.php
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/8-degree-availability-calendar/inc/backend/blocks/how-to-use.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/8-degree-availability-calendar/inc/backend/settings-page.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/8-degree-availability-calendar/inc/backend/blocks/about.php:4

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
9 plugin tags: check availability calendar, appointment calendar, calendar, availability, availability calendar...

8-degree-availability-calendar/8degree-availability-calendar.php 85% from 13 tests

The entry point to "8 Degree Availability Calendar" version 1.1.0 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("8-degree-availability-calendar.php" instead of "8degree-availability-calendar.php")
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, 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
Success! There were no dangerous files found in this plugin7,398 lines of code in 23 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript71093583,748
CSS51701292,582
SVG100565
PHP1048149503

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity10.50
▷ Minimum class complexity9.00
▷ Maximum class complexity12.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods19
▷ Static methods00.00%
▷ Public methods19100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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
14 PNG files occupy 0.03MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
css/backend/images/ui-bg_flat_10_000000_40x100.png0.20KB0.08KB▼ 57.56%
css/backend/images/ui-bg_highlight-soft_100_eeeeee_1x100.png0.27KB0.14KB▼ 47.84%
css/backend/images/ui-bg_glass_100_fdf5ce_1x400.png0.34KB0.16KB▼ 54.02%
css/backend/images/ui-bg_glass_65_ffffff_1x400.png0.20KB0.09KB▼ 57.49%
css/backend/images/ui-bg_diagonals-thick_20_666666_40x40.png0.30KB0.15KB▼ 49.68%