84% simplebooklet

Code Review | Simplebooklet PDF Viewer and Embedder

WordPress plugin Simplebooklet PDF Viewer and Embedder scored84%from 54 tests.

About plugin

  • Plugin page: simplebooklet
  • Plugin version: 1.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-6.4.0
  • WordPress version: 6.3.1
  • First release: Sep 5, 2012
  • Latest release: Oct 26, 2023
  • Number of updates: 24
  • Update frequency: every 169.5 days
  • Top authors: kenkwasnicki (100%)

Code review

54 tests

User reviews

1 review

Install metrics

500+ active /6,534 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 successfully, without throwing any errors or notices

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

An overview of server-side resources used by Simplebooklet PDF Viewer and Embedder
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0133.34 ▼3.74
Dashboard /wp-admin3.31 ▲0.0141.47 ▼3.08
Posts /wp-admin/edit.php3.37 ▲0.0146.24 ▼0.53
Add New Post /wp-admin/post-new.php5.90 ▲0.0175.86 ▼14.41
Media Library /wp-admin/upload.php3.24 ▲0.0033.53 ▼1.53

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

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

Browser metrics Passed 4 tests

Simplebooklet PDF Viewer and Embedder: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,868 ▲10713.87 ▼0.227.11 ▲5.5238.23 ▼1.64
Dashboard /wp-admin2,198 ▲215.63 ▲0.0295.93 ▲8.3443.11 ▲4.88
Posts /wp-admin/edit.php2,100 ▼02.02 ▲0.0039.28 ▲1.6436.97 ▲1.09
Add New Post /wp-admin/post-new.php1,526 ▼023.09 ▲0.00610.81 ▼37.3671.39 ▲18.21
Media Library /wp-admin/upload.php1,400 ▼04.18 ▲0.0093.54 ▼0.3741.20 ▼1.00

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however 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 errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/simplebooklet/simplebooklet.php:30

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 Passed 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
8 plugin tags: docs, flip book, pdf viewer, slides, pdf...

simplebooklet/simplebooklet.php Passed 13 tests

This is the main PHP file of "Simplebooklet PDF Viewer and Embedder" version 1.1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
101 characters long description:
[simplebooklet src="{booklet embed url}" width="{booklet width}" height="{booklet height}"] shortcode

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
Success! There were no dangerous files found in this plugin22 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP182822

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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
There are no PNG files in this plugin