89% smoothbook

Code Review | Smoothbook

WordPress plugin Smoothbook scored 89% from 54 tests.

About plugin

  • Plugin page: smoothbook
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-5.5.1
  • WordPress version: 6.3.1
  • First release: Oct 19, 2017
  • Latest release: Sep 11, 2020
  • Number of updates: 9
  • Update frequency: every 117.6 days
  • Top authors: desertedisland (100%)

Code review

54 tests

User reviews

1 review

Install metrics

60+ active / 1,540 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

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

This is a short check of server-side resources used by Smoothbook
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0237.44 ▼2.24
Dashboard /wp-admin3.32 ▲0.0145.73 ▼1.07
Posts /wp-admin/edit.php3.37 ▲0.0150.17 ▲3.07
Add New Post /wp-admin/post-new.php5.90 ▲0.0195.36 ▼13.65
Media Library /wp-admin/upload.php3.24 ▲0.0131.19 ▼3.37

Server storage [IO: ▲1.10MB] [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: 19 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for Smoothbook
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,853 ▲11814.77 ▲0.491.96 ▼0.0642.53 ▼3.60
Dashboard /wp-admin2,226 ▲355.88 ▼0.15109.27 ▼11.1239.64 ▼4.52
Posts /wp-admin/edit.php2,112 ▲232.03 ▲0.0446.60 ▲6.3445.70 ▲8.19
Add New Post /wp-admin/post-new.php1,532 ▼117.71 ▼5.58695.59 ▼6.9258.84 ▼8.85
Media Library /wp-admin/upload.php1,408 ▲234.22 ▲0.06112.47 ▼34.3647.67 ▼8.16

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
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests Passed 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 Passed 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
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need your attention:
  • Requires php: Invalid plugin version format
You can look at the official readme.txt

smoothbook/smoothbook.php 77% from 13 tests

The principal PHP file in "Smoothbook" v. 1.2 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Domain Path: Prefix the domain path with a forward slash character ("/smoothbook")
  • Domain Path: Note that the domain path follows the same naming rules as the domain name, using only dashes and lowercase characters ("smoothbook")
  • Description: The description should be shorter than 140 characters (currently 261 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected2,895 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
SVG1002,671
PHP33218154
CSS36337
JavaScript261033

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity9.00
▷ Minimum class complexity4.00
▷ Maximum class complexity14.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods16
▷ Static methods850.00%
▷ Public methods16100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants00.00%
▷ Class constants2100.00%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/book-now-button.png2.99KB1.47KB▼ 50.75%