83% offcanvas-block

Code Review | OffCanvas / Drawer

WordPress plugin OffCanvas / Drawer scored83%from 54 tests.

About plugin

  • Plugin page: offcanvas-block
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.1+
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Aug 3, 2022
  • Latest release: Oct 3, 2023
  • Number of updates: 13
  • Update frequency: every 32.9 days
  • Top authors: charlescormier (76.92%)abuhayat (30.77%)

Code review

54 tests

User reviews

1 review

Install metrics

70+ active /828 total downloads


Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼3.86ms] Passed 4 tests

Analyzing server-side resources used by OffCanvas / Drawer
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0336.30 ▼5.78
Dashboard /wp-admin3.32 ▲0.0244.03 ▼2.02
Posts /wp-admin/edit.php3.37 ▲0.0246.33 ▲1.07
Add New Post /wp-admin/post-new.php5.90 ▲0.0286.54 ▼8.72
Media Library /wp-admin/upload.php3.24 ▲0.0237.23 ▲2.33

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 17 new files
Database: no new tables, 6 new options
New WordPress options

Browser metrics Passed 4 tests

Checking browser requirements for OffCanvas / Drawer
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,852 ▲9513.67 ▼0.639.36 ▲7.1543.46 ▼4.84
Dashboard /wp-admin2,206 ▲185.88 ▲0.02105.58 ▼8.3639.17 ▼3.69
Posts /wp-admin/edit.php2,089 ▼02.05 ▲0.0738.33 ▲0.7936.67 ▲1.16
Add New Post /wp-admin/post-new.php6,422 ▲4,88728.45 ▲5.37874.45 ▲197.3236.04 ▼13.90
Media Library /wp-admin/upload.php1,391 ▲64.19 ▼0.0497.71 ▼2.4167.04 ▲23.63

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Warning
      Use of undefined constant OCB_PLUGIN_VERSION - assumed 'OCB_PLUGIN_VERSION' (this will throw an Error in a future version of PHP) in wp-content/plugins/offcanvas-block/dist/editor.asset.php on line 3
    • > PHP Warning
      Use of undefined constant OCB_PLUGIN_VERSION - assumed 'OCB_PLUGIN_VERSION' (this will throw an Error in a future version of PHP) in wp-content/plugins/offcanvas-block/dist/script.asset.php on line 3

User-side errors Passed 1 test

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


Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that need to be fixed:
  • Requires at least: Invalid version format
The official readme.txt might help

offcanvas-block/index.php 85% from 13 tests

Analyzing the main PHP file in "OffCanvas / Drawer" version 1.0.0
The following require your attention:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Main file name: The principal plugin file should be the same as the plugin slug ("offcanvas-block.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin222 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PO File1346386

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.11
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods3100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions00.00%
▷ Anonymous functions00.00%
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There are no PNG files in this plugin