84% vanilla-pdf-embed

Code Review | Vanilla PDF Embed

WordPress plugin Vanilla PDF Embed scored84%from 54 tests.

About plugin

  • Plugin page: vanilla-pdf-embed
  • Plugin version: 0.0.8
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.5.0
  • WordPress version: 6.3.1
  • First release: Dec 7, 2013
  • Latest release: Nov 8, 2016
  • Number of updates: 30
  • Update frequency: every 35.6 days
  • Top authors: _doherty (100%)

Code review

54 tests

User reviews

32 reviews

Install metrics

6,000+ active /95,864 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

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

Server-side resources used by Vanilla PDF Embed
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0233.99 ▼3.40
Dashboard /wp-admin3.33 ▼0.0242.05 ▼20.31
Posts /wp-admin/edit.php3.38 ▲0.0247.71 ▼0.02
Add New Post /wp-admin/post-new.php5.91 ▲0.0278.70 ▼20.08
Media Library /wp-admin/upload.php3.25 ▲0.0234.85 ▲0.40

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Vanilla PDF Embed
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.24 ▼1.131.73 ▼0.1839.88 ▼4.13
Dashboard /wp-admin2,206 ▲184.84 ▼0.09112.92 ▼2.8741.60 ▼4.54
Posts /wp-admin/edit.php2,089 ▲32.01 ▼0.0239.78 ▲4.0335.09 ▼0.28
Add New Post /wp-admin/post-new.php1,532 ▲1823.48 ▲5.85667.31 ▼10.3550.59 ▼10.19
Media Library /wp-admin/upload.php1,385 ▼34.21 ▲0.0393.63 ▼6.9342.54 ▲0.78

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check 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 | 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
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/vanilla-pdf-embed/vanilla-pdf-embed.php:106

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 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
Please fix the following attributes: You can take inspiration from this readme.txt

vanilla-pdf-embed/vanilla-pdf-embed.php Passed 13 tests

This is the main PHP file of "Vanilla PDF Embed" version 0.0.8, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
38 characters long description:
Simple PDF embeds using <object>

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin80 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1225680

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.55
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%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There were not PNG files found in your plugin