84% pdfsharing

Code Review | pdfsharing

WordPress plugin pdfsharing scored84%from 54 tests.

About plugin

  • Plugin page: pdfsharing
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.4
  • WordPress version: 6.3.1
  • First release: Mar 9, 2016
  • Latest release: Mar 9, 2016
  • Number of updates: 3
  • Update frequency: every 9.3 days
  • Top authors: pdfsharing (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /709 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

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

A check of server-side resources used by pdfsharing
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0237.72 ▼2.18
Dashboard /wp-admin3.32 ▼0.0243.99 ▼9.88
Posts /wp-admin/edit.php3.37 ▲0.0244.89 ▼1.83
Add New Post /wp-admin/post-new.php5.90 ▲0.0290.03 ▼15.94
Media Library /wp-admin/upload.php3.24 ▲0.0234.66 ▲1.39

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

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

Browser metrics Passed 4 tests

Checking browser requirements for pdfsharing
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.16 ▼1.511.72 ▲0.0342.68 ▼0.46
Dashboard /wp-admin2,203 ▲125.85 ▲0.03106.94 ▲0.0245.33 ▲5.78
Posts /wp-admin/edit.php2,089 ▼02.04 ▼0.0139.84 ▼2.0134.82 ▼3.63
Add New Post /wp-admin/post-new.php1,519 ▼922.95 ▲4.80648.61 ▲35.4847.19 ▼6.35
Media Library /wp-admin/upload.php1,391 ▲34.22 ▲0.0696.57 ▼2.9142.66 ▲0.63

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • Zombie WordPress options were found after uninstall: 8 options
    • widget_pdfsharing_widget
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_pdfsharing_list_widget
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
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_action() in wp-content/plugins/pdfsharing/pdfsharing.php:30

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
9 plugin tags: sharing, pdf, facebook, xing, social...

pdfsharing/pdfsharing.php Passed 13 tests

The main file in "pdfsharing" v. 1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
126 characters long description:
With this plugin you can use the service from pdfsharing.com in your site. Please lookup pdfsharing.com for more informations.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
No dangerous file extensions were detected307 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP160136307

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.14
Average class complexity8.50
▷ Minimum class complexity8.00
▷ Maximum class complexity9.00
Average method complexity2.88
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants00.00%
▷ Class constants2100.00%
▷ Public constants2100.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
No PNG files were detected