84% jupdf-pdf-viewer

Code Review | jupdf pdf viewer

WordPress plugin jupdf pdf viewer scored84%from 54 tests.

About plugin

  • Plugin page: jupdf-pdf-viewer
  • Plugin version: 0.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.5.3
  • WordPress version: 6.3.1
  • First release: May 14, 2015
  • Latest release: Jun 30, 2016
  • Number of updates: 15
  • Update frequency: every 27.5 days
  • Top authors: horiyuki (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active /5,509 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

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

A check of server-side resources used by jupdf pdf viewer
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0038.15 ▼3.11
Dashboard /wp-admin3.31 ▼0.0449.11 ▼21.50
Posts /wp-admin/edit.php3.36 ▲0.0052.08 ▲0.25
Add New Post /wp-admin/post-new.php5.89 ▲0.0088.12 ▼12.35
Media Library /wp-admin/upload.php3.23 ▲0.0035.02 ▼0.22

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 474 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
db_upgraded
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for jupdf pdf viewer
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,791 ▲3014.22 ▼0.071.61 ▼0.2443.85 ▼3.03
Dashboard /wp-admin2,192 ▲155.58 ▼0.0685.66 ▼14.9941.95 ▼4.95
Posts /wp-admin/edit.php2,100 ▼01.99 ▼0.0040.46 ▲4.8538.28 ▼1.17
Add New Post /wp-admin/post-new.php1,528 ▼023.11 ▲0.09643.57 ▼55.4362.90 ▲15.25
Media Library /wp-admin/upload.php1,400 ▼04.35 ▲0.15107.94 ▲6.3044.01 ▼1.78

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

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× 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/jupdf-pdf-viewer/jupdf-pdf-viewer.php:11

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

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that require attention:
  • Screenshots: These screenshots do not have images: #1 (Viewer example with default size.), #2 (Shortcode example), #3 (Viewer with Japanese pdf file), #4 (Viewer menu), #5 (click to prev/next area)
The official readme.txt is a good inspiration

jupdf-pdf-viewer/jupdf-pdf-viewer.php Passed 13 tests

This is the main PHP file of "jupdf pdf viewer" version 0.1.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
45 characters long description:
PDF viewer on your pages and posts with jupdf

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin54,637 lines of code in 110 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript875,1637,36651,714
CSS5253541,869
Markdown52370500
HTML160118299
SVG1000191
JSON10032
PHP191232

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No complexity issues detected
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%
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

Using a strong compression for your PNG files is a great way to speed-up your plugin
71 compressed PNG files occupy 0.05MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
jupdf/css/images/toolbarButton-presentationMode@2x.png0.57KB0.90KB0.00%
jupdf/css/images/toolbarButton-sidebarToggle@2x.png0.32KB0.57KB0.00%
jupdf/css/images/toolbarButton-secondaryToolbarToggle-rtl@2x.png0.45KB0.79KB0.00%
jupdf/css/images/findbarButton-next-rtl@2x.png0.30KB0.48KB0.00%
jupdf/css/images/next.png0.31KB0.14KB▼ 54.29%