83% bookacamp

Code Review | WP-Bookacamp

WordPress plugin WP-Bookacamp scored83%from 54 tests.

About plugin

  • Plugin page: bookacamp
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.8.0
  • WordPress version: 6.3.1
  • First release: Aug 25, 2021
  • Latest release: Aug 25, 2021
  • Number of updates: 3
  • Update frequency: every 1.7 days
  • Top authors: mmethner (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /321 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.02MB] [CPU: ▼4.96ms] Passed 4 tests

Server-side resources used by WP-Bookacamp
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0335.86 ▼4.14
Dashboard /wp-admin3.34 ▼0.0048.50 ▼12.70
Posts /wp-admin/edit.php3.39 ▲0.0445.96 ▲0.31
Add New Post /wp-admin/post-new.php5.94 ▲0.0688.61 ▼3.29
Media Library /wp-admin/upload.php3.26 ▲0.0439.93 ▲4.89

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 22 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for WP-Bookacamp
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,829 ▲8313.18 ▼1.221.61 ▼0.3039.63 ▼4.17
Dashboard /wp-admin2,235 ▲506.05 ▲0.20108.96 ▲0.6641.05 ▲1.87
Posts /wp-admin/edit.php2,125 ▲362.03 ▲0.0239.18 ▼5.7735.10 ▼1.87
Add New Post /wp-admin/post-new.php6,367 ▲4,83428.03 ▲4.93852.92 ▲213.6336.27 ▼15.73
Media Library /wp-admin/upload.php1,417 ▲264.22 ▲0.0195.74 ▼4.7842.92 ▼0.02

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
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments

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 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/bookacamp/admin/partials/wp-bookacamp-admin-display.php

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 90% 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
6 plugin tags: events, camps, bookacamp, book-a-camp, vacation...

bookacamp/wp-bookacamp.php 77% from 13 tests

The primary PHP file in "WP-Bookacamp" version 1.0.0 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Domain Path: The domain path points to a folder that does not exist ("/languages")
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Main file name: The principal plugin file should be the same as the plugin slug ("bookacamp.php" instead of "wp-bookacamp.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected803 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP12185674568
JavaScript21727223
CSS12411
Markdown1101

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.16
Average class complexity4.38
▷ Minimum class complexity1.00
▷ Maximum class complexity17.00
Average method complexity1.64
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods42
▷ Static methods24.76%
▷ Public methods3071.43%
▷ Protected methods00.00%
▷ Private methods1228.57%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
2 PNG files occupy 0.07MB with 0.04MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/img/bookacamp.png20.93KB12.54KB▼ 40.07%
assets/screenshot-1.png54.79KB20.55KB▼ 62.50%