83% pdf-world-de-pdf-blatterbar-einfugen

Code Review | PDF.world Block

WordPress plugin PDF.world Block scored83%from 54 tests.

About plugin

  • Plugin page: pdf-world-de-pdf-...
  • Plugin version: 1.2
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.2
  • WordPress version: 6.3.1
  • First release: Oct 23, 2019
  • Latest release: Oct 28, 2019
  • Number of updates: 10
  • Update frequency: every 1.7 days
  • Top authors: pdfdotworld (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /3,605 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
Install script ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼8.93ms] Passed 4 tests

An overview of server-side resources used by PDF.world Block
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0143.14 ▼2.31
Dashboard /wp-admin3.33 ▲0.0349.47 ▼4.72
Posts /wp-admin/edit.php3.39 ▲0.0353.40 ▼2.16
Add New Post /wp-admin/post-new.php5.92 ▲0.0386.42 ▼26.53
Media Library /wp-admin/upload.php3.26 ▲0.0339.52 ▲4.80

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

Browser metrics Passed 4 tests

PDF.world Block: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,959 ▲19820.61 ▲6.265.76 ▲4.2343.02 ▼0.99
Dashboard /wp-admin2,280 ▲9910.68 ▲4.98239.28 ▲132.0543.92 ▲2.80
Posts /wp-admin/edit.php2,220 ▲12010.24 ▲8.2796.30 ▲55.8633.73 ▼5.55
Add New Post /wp-admin/post-new.php6,192 ▲4,66618.84 ▼4.12815.38 ▲147.4939.85 ▼24.69
Media Library /wp-admin/upload.php1,505 ▲10212.27 ▲8.10143.20 ▲41.1340.18 ▼7.72

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
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 75% from 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)
Good news, no errors were detected

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
Please fix the following items
  • 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/pdf-world-de-pdf-blatterbar-einfugen/public/public.php:22

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 86% 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
Attributes that require attention:
  • Screenshots: Screenshot #1 (Anleitung, wie eine blätterbare PDF Datei in deinem Blog eingefügt werden kann) image missing
You can look at the official readme.txt

pdf-world-de-pdf-blatterbar-einfugen/pdf-viewer-block.php 77% from 13 tests

The main PHP script in "PDF.world Block" version 1.2 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("pdf-world-de-pdf-blatterbar-einfugen.php" instead of "pdf-viewer-block.php")
  • Description: Please keep the plugin description shorter than 140 characters (currently 666 characters long)
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

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
There were no executable files found in this plugin923 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
SVG302613
JavaScript2450230
PHP4106160
CSS26020

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.23
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 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
4 PNG files occupy 3.00MB with 2.80MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/banner-1544x500.png2,265.94KB103.14KB▼ 95.45%
assets/icon-256x256.png192.64KB9.57KB▼ 95.03%
assets/icon-128x128.png48.29KB4.44KB▼ 90.81%
assets/banner-772x250.png566.66KB44.30KB▼ 92.18%