89% edocr-document-viewer

Code Review | edocr Document Viewer

WordPress plugin edocr Document Viewer scored89%from 54 tests.

About plugin

  • Plugin page: edocr-document-vi...
  • Plugin version: 1.0.4
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.5
  • WordPress version: 6.3.1
  • First release: Apr 7, 2017
  • Latest release: Aug 12, 2020
  • Number of updates: 8
  • Update frequency: every 152.9 days
  • Top authors: edocr (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,535 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
This plugin's installer ran successfully

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

An overview of server-side resources used by edocr Document Viewer
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0038.38 ▼1.35
Dashboard /wp-admin3.31 ▲0.0148.25 ▲2.88
Posts /wp-admin/edit.php3.36 ▲0.0044.69 ▼1.34
Add New Post /wp-admin/post-new.php5.89 ▲0.0094.08 ▼0.16
Media Library /wp-admin/upload.php3.23 ▲0.0032.02 ▼1.41
edocr Document Viewer /wp-admin/options-general.php?page=edocr_viewer3.2330.38

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for edocr Document Viewer
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5813.49 ▼0.771.80 ▼0.5638.23 ▼9.48
Dashboard /wp-admin2,213 ▲284.83 ▼1.05103.56 ▲4.5139.23 ▼3.88
Posts /wp-admin/edit.php2,093 ▲12.05 ▲0.0536.03 ▼3.0635.19 ▼2.59
Add New Post /wp-admin/post-new.php1,545 ▲318.39 ▲0.26624.06 ▼19.8960.01 ▲3.48
Media Library /wp-admin/upload.php1,392 ▲44.17 ▼0.0597.45 ▼14.3642.55 ▼2.64
edocr Document Viewer /wp-admin/options-general.php?page=edocr_viewer9512.0623.4930.43

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 were found after uninstall: 6 options
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts

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

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% 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: Add descriptions for screenshots #2, #3 in edocr-document-viewer/assets to your readme.txt
  • Tags: Please delete some tags, you are using 17 tag instead of maximum 10
Please take inspiration from this readme.txt

edocr-document-viewer/edocr-document-viewer.php Passed 13 tests

The main PHP script in "edocr Document Viewer" version 1.0.4 is automatically included on every request by WordPress
136 characters long description:
The edocr Document Viewer for Wordpress allows you to embed your documents on your WordPress site using our feature rich document viewer

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 detected239 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP32115178
Markdown140061

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.22
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%
Functions5
▷ Named functions5100.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
1 PNG file occupies 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/edocr-master-logo-rgb-w-back.png19.37KB7.85KB▼ 59.50%