84% pdf-secure

Code Review | PDF secure

WordPress plugin PDF secure scored84%from 54 tests.

About plugin

  • Plugin page: pdf-secure
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-6.2
  • WordPress version: 6.3.1
  • First release: Jan 16, 2019
  • Latest release: Apr 5, 2023
  • Number of updates: 15
  • Update frequency: every 102.9 days
  • Top authors: kinjaldalwadi (60%)viitorcloudvc (40%)kinjaldalwadivc (13.33%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /1,739 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

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

An overview of server-side resources used by PDF secure
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0043.74 ▲0.92
Dashboard /wp-admin3.31 ▲0.0050.11 ▼2.05
Posts /wp-admin/edit.php3.36 ▲0.0053.14 ▲0.69
Add New Post /wp-admin/post-new.php5.89 ▲0.0088.37 ▼11.51
Media Library /wp-admin/upload.php3.23 ▲0.0040.94 ▲4.89

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

Browser metrics Passed 4 tests

A check of browser resources used by PDF secure
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,921 ▲16013.41 ▼0.949.33 ▲7.3243.22 ▼6.27
Dashboard /wp-admin2,198 ▲215.58 ▼0.0984.62 ▼6.2946.14 ▲5.67
Posts /wp-admin/edit.php2,100 ▼01.99 ▲0.0139.60 ▼0.3037.18 ▼0.82
Add New Post /wp-admin/post-new.php1,526 ▼023.18 ▼0.03678.23 ▼1.6954.45 ▼10.93
Media Library /wp-admin/upload.php1,400 ▲34.22 ▼0.00113.61 ▼31.7044.74 ▼17.58

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/pdf-secure/index.php:32

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Please fix the following attributes:
  • Screenshots: Add a description for screenshot #1 in pdf-secure/assets to your readme.txt
You can look at the official readme.txt

pdf-secure/index.php 92% from 13 tests

"PDF secure" version 1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please take the time to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("pdf-secure.php" instead of "index.php")

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
Good job! No executable or dangerous file extensions detected18 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP131218

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.00
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%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
PNG images were not found in this plugin