79% algori-pdf-viewer

Code Review | Algori PDF Viewer

WordPress plugin Algori PDF Viewer scored79%from 54 tests.

About plugin

  • Plugin page: algori-pdf-viewer
  • Plugin version: 1.0.7
  • PHP compatiblity: 5.6.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0.0-6.0
  • WordPress version: 6.3.1
  • First release: Sep 13, 2018
  • Latest release: Jul 11, 2022
  • Number of updates: 16
  • Update frequency: every 87.3 days
  • Top authors: kevinbazira (100%)

Code review

54 tests

User reviews

9 reviews

Install metrics

8,000+ active /74,230 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼1.23MB] [CPU: ▼43.59ms] Passed 4 tests

This is a short check of server-side resources used by Algori PDF Viewer
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.74 ▼0.7211.93 ▼27.88
Dashboard /wp-admin2.78 ▼0.5315.14 ▼35.72
Posts /wp-admin/edit.php2.78 ▼0.5814.65 ▼30.87
Add New Post /wp-admin/post-new.php2.78 ▼3.1114.18 ▼79.89
Media Library /wp-admin/upload.php2.78 ▼0.4514.18 ▼23.87

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 385 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
db_upgraded
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Algori PDF Viewer
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,799 ▲3814.18 ▼0.021.62 ▼0.1138.70 ▼5.27
Dashboard /wp-admin2,192 ▲185.51 ▼0.1387.70 ▼0.1536.59 ▼4.15
Posts /wp-admin/edit.php2,097 ▼61.99 ▲0.0039.53 ▲0.9136.86 ▲4.40
Add New Post /wp-admin/post-new.php6,199 ▲4,66818.98 ▼3.91839.53 ▲242.6390.64 ▲25.96
Media Library /wp-admin/upload.php1,403 ▲64.16 ▼0.0796.88 ▼5.6844.45 ▼0.01

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • This plugin did not uninstall without warnings or errors
    • > User notice in wp-includes/functions.php+5905
    Function WP_Scripts::localize was called incorrectly. The $l10n parameter must be an array. To pass arbitrary data to scripts, use the wp_add_inline_script() function instead. Please see Debugging in WordPress for more information. (This message was added in version 5.7.0.)
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 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
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
10 plugin tags: pdf viewer, pdf file viewer, block editor, pdf reader, pdf print...

algori-pdf-viewer/algori-pdf-viewer-lite.php 85% from 13 tests

The main PHP file in "Algori PDF Viewer" ver. 1.0.7 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Description: The description should be shorter than 140 characters (currently 234 characters long)
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("algori-pdf-viewer.php" instead of "algori-pdf-viewer-lite.php")

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
No dangerous file extensions were detected67,726 lines of code in 27 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript71,24333265,141
CSS2263351,933
HTML14216299
SVG900150
Markdown1370108
PHP3106149
Sass37133
JSON10013

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.18
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

All PNG images should be compressed to minimize bandwidth usage for end users
74 compressed PNG files occupy 0.05MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
dist/web/images/toolbarButton-pageUp-rtl@2x.png0.40KB0.64KB0.00%
dist/web/images/treeitem-collapsed@2x.png0.15KB0.20KB0.00%
dist/web/images/toolbarButton-viewAttachments@2x.png0.84KB1.56KB0.00%
dist/web/images/toolbarButton-pageDown.png0.23KB0.36KB0.00%
dist/web/images/secondaryToolbarButton-rotateCcw@2x.png0.71KB1.12KB0.00%