84% pdf-embed

Code Review | Pdf Embed

WordPress plugin Pdf Embed scored 84% from 54 tests.

About plugin

  • Plugin page: pdf-embed
  • Plugin version: 0.3.5
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6.0-6.3
  • WordPress version: 6.3.1
  • First release: Jan 11, 2022
  • Latest release: Sep 12, 2023
  • Number of updates: 31
  • Update frequency: every 19.7 days
  • Top authors: tropicalista (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

7,000+ active / 61,876 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
Install script ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼2.99ms] Passed 4 tests

This is a short check of server-side resources used by Pdf Embed
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0442.30 ▲0.58
Dashboard /wp-admin3.34 ▲0.0348.61 ▼2.37
Posts /wp-admin/edit.php3.39 ▲0.0348.92 ▲4.08
Add New Post /wp-admin/post-new.php5.92 ▲0.0382.77 ▼14.23
Media Library /wp-admin/upload.php3.26 ▲0.0339.28 ▲5.85

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 15 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-comments
db_upgraded
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for Pdf Embed
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,803 ▲4613.22 ▼0.781.56 ▼0.4840.78 ▼9.95
Dashboard /wp-admin2,203 ▲155.81 ▲0.9397.74 ▼20.6036.57 ▼7.89
Posts /wp-admin/edit.php2,089 ▼02.03 ▲0.0034.57 ▲0.8135.44 ▲3.33
Add New Post /wp-admin/post-new.php6,593 ▲5,06022.93 ▼0.52950.58 ▲270.5538.93 ▼11.43
Media Library /wp-admin/upload.php1,385 ▼34.18 ▲0.01112.02 ▲10.4648.28 ▲2.22

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

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 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/pdf-embed/pdf-embed.php:35

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
7 plugin tags: embed pdf, block, pdf embedder, pdf block, pdf...

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

The main file in "Pdf Embed" v. 0.3.5 serves as a complement to information provided in readme.txt and as the entry point to the plugin
37 characters long description:
PDF embedded with official Adobe API.

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 plugin196 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
JSON40081
PO File1232567
PHP342344
CSS2002
JavaScript2002

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.08
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%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
PNG images were not found in this plugin