84% pdf-thumbnails

Code Review | PDF Thumbnails

WordPress plugin PDF Thumbnails scored84%from 54 tests.

About plugin

  • Plugin page: pdf-thumbnails
  • Plugin version: 2.2.0
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Apr 7, 2014
  • Latest release: Oct 24, 2016
  • Number of updates: 37
  • Update frequency: every 61.0 days
  • Top authors: stianlik (100%)

Code review

54 tests

User reviews

9 reviews

Install metrics

1,000+ active /31,944 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 successfully, without throwing any errors or notices

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

Analyzing server-side resources used by PDF Thumbnails
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0035.57 ▼4.58
Dashboard /wp-admin3.31 ▲0.0044.84 ▼7.12
Posts /wp-admin/edit.php3.36 ▲0.0044.44 ▼1.09
Add New Post /wp-admin/post-new.php5.89 ▲0.0088.63 ▼14.14
Media Library /wp-admin/upload.php3.23 ▲0.0034.97 ▲2.98

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

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

Browser metrics Passed 4 tests

A check of browser resources used by PDF Thumbnails
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,798 ▲3714.28 ▼0.351.56 ▼0.0643.24 ▲1.37
Dashboard /wp-admin2,207 ▲385.58 ▼0.0191.30 ▼12.1342.00 ▲7.97
Posts /wp-admin/edit.php2,110 ▲72.00 ▼0.0338.71 ▼2.2437.42 ▼0.21
Add New Post /wp-admin/post-new.php1,537 ▲122.99 ▲4.85600.48 ▼26.0759.77 ▼12.03
Media Library /wp-admin/upload.php1,406 ▲34.15 ▲0.0191.65 ▼12.6041.32 ▼2.55

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • 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 take a closer look at the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/pdf-thumbnails/pdf-thumbnails.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
3 plugin tags: generator, pdf, thumbnail

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

The main file in "PDF Thumbnails" v. 2.2.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
54 characters long description:
Generates thumbnail for PDF-files when they are added.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
There were no executable files found in this plugin167 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP22222151
JSON10016

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity7.00
▷ Minimum class complexity7.00
▷ Maximum class complexity7.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods116.67%
▷ Public methods233.33%
▷ Protected methods00.00%
▷ Private methods466.67%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG files were detected