83% good-url-preview-box

Code Review | URL-Preview-Box

WordPress plugin URL-Preview-Box scored83%from 54 tests.

About plugin

  • Plugin page: good-url-preview-box
  • Plugin version: 1.20
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9.0-5.3.2
  • WordPress version: 6.3.1
  • First release: Oct 14, 2016
  • Latest release: Dec 20, 2019
  • Number of updates: 71
  • Update frequency: every 16.4 days
  • Top authors: mraliende (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

400+ active /10,672 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
Installer ran successfully

Server metrics [RAM: ▲0.32MB] [CPU: ▼0.17ms] Passed 4 tests

This is a short check of server-side resources used by URL-Preview-Box
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.71 ▲0.2545.37 ▲7.28
Dashboard /wp-admin3.64 ▲0.3350.23 ▼2.57
Posts /wp-admin/edit.php3.74 ▲0.3950.51 ▲3.76
Add New Post /wp-admin/post-new.php6.23 ▲0.3590.62 ▼7.68
Media Library /wp-admin/upload.php3.58 ▲0.3541.28 ▲5.83
URL Preview /wp-admin/admin.php?page=gurlpb_adminmenu3.5536.63
Statistics /wp-admin/admin.php?page=gurlpb_statistics3.5535.73
Cache /wp-admin/admin.php?page=gurlpb_cache_settings3.5535.60

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 52 new files
Database: no new tables, 13 new options
New WordPress options
gurlpb-random
gurlpb-showexcerpt
gurlpb-hide-setting-a
can_compress_scripts
widget_recent-comments
gurlpb-admin-id
widget_recent-posts
gurlpb-setting-a
theysaidso_admin_options
widget_theysaidso_widget
...

Browser metrics Passed 4 tests

This is an overview of browser requirements for URL-Preview-Box
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,893 ▲15813.31 ▼1.082.20 ▲0.5342.48 ▲2.47
Dashboard /wp-admin2,260 ▲755.02 ▼0.86101.43 ▲0.3573.29 ▲27.09
Posts /wp-admin/edit.php2,144 ▲522.23 ▲0.1934.97 ▼9.7433.82 ▼5.35
Add New Post /wp-admin/post-new.php6,292 ▲4,77219.71 ▼3.55952.21 ▲346.4257.10 ▼3.82
Media Library /wp-admin/upload.php1,434 ▲494.26 ▲0.05101.37 ▲4.8665.34 ▲21.97
URL Preview /wp-admin/admin.php?page=gurlpb_adminmenu9031.7632.1127.28
Statistics /wp-admin/admin.php?page=gurlpb_statistics8472.1731.6723.77
Cache /wp-admin/admin.php?page=gurlpb_cache_settings8701.9226.3626.09

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • The uninstall procedure has failed, leaving 12 options in the database
    • widget_recent-posts
    • gurlpb-random
    • gurlpb-setting-a
    • db_upgraded
    • gurlpb-hide-setting-a
    • widget_recent-comments
    • widget_theysaidso_widget
    • gurlpb-boxes
    • gurlpb-admin-id
    • 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)
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 items
  • 6× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/good-url-preview-box/gurlpb-utils.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/good-url-preview-box/blocks/gurlpb.php:56
    • > PHP Fatal error
      Uncaught Error: Class 'Gurlpb_utils' not found in wp-content/plugins/good-url-preview-box/gurlpb-deactivated.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'Gurlpb_utils' not found in wp-content/plugins/good-url-preview-box/gurlpb-start.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/good-url-preview-box/gute-url-preview-box.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/good-url-preview-box/gurlpb-activated.php:8

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 81% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need your attention:
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === good-url-preview-box === )
  • Screenshots: Add images for these screenshots: #1 (First screen. Register to use full functionality.), #2 (Writing an post and adding an URL for the spacex.com career.)
  • Tags: There are too many tags (20 tag instead of maximum 10)
Please take inspiration from this readme.txt

good-url-preview-box/gute-url-preview-box.php 85% from 13 tests

The primary PHP file in "URL-Preview-Box" version 1.20 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("good-url-preview-box.php" instead of "gute-url-preview-box.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Success! There were no dangerous files found in this plugin1,987 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PHP12249661,770
JavaScript23150174
CSS3131143

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.53
Average class complexity28.25
▷ Minimum class complexity1.00
▷ Maximum class complexity99.00
Average method complexity16.57
▷ Minimum method complexity1.00
▷ Maximum method complexity99.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods14
▷ Static methods14100.00%
▷ Public methods14100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions30
▷ Named functions30100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
12 PNG files occupy 1.11MB with 0.72MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
gurlpb_wordpress-editor-icon.png9.45KB5.46KB▼ 42.25%
gurlpb-example1.png47.46KB13.82KB▼ 70.87%
gutenberg-post-1.png105.01KB30.12KB▼ 71.32%
gutenberg-post-6.png121.09KB35.11KB▼ 71.01%
gutenberg-post-4.png116.69KB34.26KB▼ 70.64%