84% embedding-pdf

Code Review | Embedding PDF

WordPress plugin Embedding PDF scored84%from 54 tests.

About plugin

  • Plugin page: embedding-pdf
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-3.8
  • WordPress version: 6.3.1
  • First release: Feb 25, 2014
  • Latest release: Feb 28, 2014
  • Number of updates: 6
  • Update frequency: every 0.7 days
  • Top authors: webdesigner.dinesh (100%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active /2,286 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

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

This is a short check of server-side resources used by Embedding PDF
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0245.06 ▲1.82
Dashboard /wp-admin3.32 ▲0.0259.79 ▲7.63
Posts /wp-admin/edit.php3.37 ▲0.0258.97 ▼7.84
Add New Post /wp-admin/post-new.php5.90 ▲0.0292.50 ▼24.73
Media Library /wp-admin/upload.php3.24 ▲0.0135.47 ▼1.86

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-comments
db_upgraded
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Embedding PDF
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.21 ▼0.141.71 ▼0.3145.16 ▲4.34
Dashboard /wp-admin2,186 ▲95.58 ▼0.09101.90 ▲4.9442.62 ▼2.74
Posts /wp-admin/edit.php2,100 ▼01.95 ▼0.0641.66 ▲0.7038.00 ▼1.75
Add New Post /wp-admin/post-new.php1,526 ▼1423.25 ▲4.81628.34 ▲0.5657.08 ▼14.74
Media Library /wp-admin/upload.php1,400 ▼04.19 ▼0.0298.36 ▼7.1543.24 ▼3.25

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

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 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/embedding-pdf/embedding-PDF.php:130

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 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that need to be fixed:
  • Donate link: Invalid url: ""
You can look at the official readme.txt

embedding-pdf/embedding-PDF.php 92% from 13 tests

The main PHP script in "Embedding PDF" version 1.0.0 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("embedding-pdf.php" instead of "embedding-PDF.php")

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

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.54
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%
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
There are no PNG files in this plugin