90% rsv-pdf-preview

Code Review | RSV PDF Preview

WordPress plugin RSV PDF Preview scored90%from 54 tests.

About plugin

  • Plugin page: rsv-pdf-preview
  • Plugin version: 1.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-5.3.1
  • WordPress version: 6.3.1
  • First release: Dec 16, 2019
  • Latest release: Dec 16, 2019
  • Number of updates: 3
  • Update frequency: every 0.3 days
  • Top authors: Rapid Sort (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /525 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

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

This is a short check of server-side resources used by RSV PDF Preview
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0145.01 ▲8.46
Dashboard /wp-admin3.32 ▼0.0349.54 ▼14.46
Posts /wp-admin/edit.php3.37 ▲0.0153.04 ▲8.82
Add New Post /wp-admin/post-new.php5.90 ▲0.01104.15 ▲23.26
Media Library /wp-admin/upload.php3.24 ▲0.0136.51 ▲4.13

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

Browser metrics Passed 4 tests

RSV PDF Preview: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,901 ▲11514.18 ▼0.2547.36 ▲45.5947.18 ▲3.01
Dashboard /wp-admin2,198 ▲215.61 ▼0.0685.42 ▼0.4436.44 ▼2.66
Posts /wp-admin/edit.php2,100 ▼01.98 ▼0.0445.99 ▲10.0437.22 ▲1.46
Add New Post /wp-admin/post-new.php1,531 ▼023.17 ▲0.08757.35 ▲68.4062.77 ▲3.50
Media Library /wp-admin/upload.php1,403 ▲64.16 ▼0.04108.90 ▲7.6352.90 ▲5.59

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests Passed 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 Passed 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
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Please fix the following attributes:
  • Screenshots: Screenshot #1 (No Screenshoots) image required
You can look at the official readme.txt

rsv-pdf-preview/rsv-pdf-preview.php Passed 13 tests

The entry point to "RSV PDF Preview" version 1.0 is a PHP file that has certain tags in its header comment area
81 characters long description:
Show sample preview of any pdf without creating new short version of pdf document

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
Good job! No executable or dangerous file extensions detected66,772 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript313,53964966,710
CSS11032
PHP15630

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.20
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%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
PNG images were not found in this plugin