84% plugin-installer-from-public-url

Code Review | Plugin Installer from public URL

WordPress plugin Plugin Installer from public URL scored 84% from 54 tests.

About plugin

  • Plugin page: plugin-installer-...
  • Plugin version: 0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-5.9.3
  • WordPress version: 6.3.1
  • First release: Nov 27, 2020
  • Latest release: May 3, 2022
  • Number of updates: 5
  • Update frequency: every 104.8 days
  • Top authors: cliffandy39 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active / 1,963 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.03MB] [CPU: ▼8.50ms] Passed 4 tests

A check of server-side resources used by Plugin Installer from public URL
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0246.95 ▲3.49
Dashboard /wp-admin3.34 ▲0.0352.87 ▼29.39
Posts /wp-admin/edit.php3.39 ▲0.0352.16 ▲1.19
Add New Post /wp-admin/post-new.php5.92 ▲0.0390.91 ▼7.53
Media Library /wp-admin/upload.php3.26 ▲0.0337.90 ▲1.75
Install from URL /wp-admin/plugins.php?page=plgf_pipu01_page3.3242.16

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
db_upgraded
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Plugin Installer from public URL
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲1513.22 ▲0.011.72 ▼0.0240.73 ▼3.36
Dashboard /wp-admin2,204 ▲15.84 ▲0.96100.94 ▼16.5440.58 ▼2.86
Posts /wp-admin/edit.php2,093 ▲42.05 ▼0.0143.10 ▲2.4334.60 ▲1.28
Add New Post /wp-admin/post-new.php1,536 ▼623.19 ▲4.78725.15 ▼29.9272.15 ▲2.04
Media Library /wp-admin/upload.php1,392 ▲44.25 ▼0.0398.62 ▼11.1340.88 ▼5.19
Install from URL /wp-admin/plugins.php?page=plgf_pipu01_page7622.0326.1825.59

Uninstaller [IO: ✅] [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 7 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • plgf_pipu01_deactivation_redirect
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts

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
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/plugin-installer-from-public-url/plugin-installer-from-public-url.php:10

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that require attention: The official readme.txt is a good inspiration

plugin-installer-from-public-url/plugin-installer-from-public-url.php 92% from 13 tests

Analyzing the main PHP file in "Plugin Installer from public URL" version 0.2
The following require your attention:
  • Description: Please don't use more than 140 characters for the plugin description (currently 176 characters long)

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 detected176 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP15010172
HTML1004

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.32
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%
Functions11
▷ Named functions11100.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
1 PNG file occupies 0.05MB with 0.03MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
help.png49.83KB19.67KB▼ 60.52%