93% shine-pdf

Code Review | Shine PDF Embeder

WordPress plugin Shine PDF Embeder scored 93% from 54 tests.

About plugin

  • Plugin page: shine-pdf
  • Plugin version: 1.0
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.8
  • WordPress version: 5.8.1
  • First release: Mar 19, 2019
  • Latest release: Mar 19, 2019
  • Number of updates: 3
  • Update frequency: every 0.7 days
  • Top authors: sabbirislam397 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active / 1,394 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

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

Server-side resources used by Shine PDF Embeder
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.85 ▲0.0142.54 ▲9.09
Dashboard /wp-admin3.07 ▲0.0244.00 ▲0.34
Posts /wp-admin/edit.php3.13 ▲0.0241.73 ▼1.71
Add New Post /wp-admin/post-new.php5.44 ▲0.0190.08 ▼552.68
Media Library /wp-admin/upload.php3.02 ▲0.0133.26 ▼5.47

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 4 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Shine PDF Embeder
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,681 ▲8516.19 ▲0.288.08 ▼0.1750.62 ▲3.23
Dashboard /wp-admin2,972 ▲415.88 ▼0.07137.41 ▼2.90108.78 ▼8.20
Posts /wp-admin/edit.php2,741 ▲22.70 ▲0.0065.05 ▲2.2998.57 ▲8.80
Add New Post /wp-admin/post-new.php1,596 ▼7418.74 ▼0.39397.07 ▲35.86105.24 ▼8.71
Media Library /wp-admin/upload.php1,809 ▲25.02 ▲0.02146.73 ▼2.62120.37 ▼5.08

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The plugin uninstalled completely, with no zombie files or tables

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking 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 applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/shine-pdf/shine.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need to be fixed:
  • Donate link: Please fix this invalid url: ""
Please take inspiration from this readme.txt

shine-pdf/shine.php 85% from 13 tests

The main PHP file in "Shine PDF Embeder" ver. 1.0 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("shine-pdf.php" instead of "shine.php")
  • Description: Keep the plugin description shorter than 140 characters (currently 164 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Good job! No executable or dangerous file extensions detected255 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript1100182
PHP129966
CSS1007

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
All good! No complexity issues found
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%
Functions9
▷ Named functions9100.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
No PNG images were found in this plugin