84% gp-use-slug-for-downloads

Code Review | GP Use Slug for Downloads

WordPress plugin GP Use Slug for Downloads scored84%from 54 tests.

About plugin

  • Plugin page: gp-use-slug-for-d...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-6.2
  • WordPress version: 6.3.1
  • First release: Dec 15, 2015
  • Latest release: Apr 17, 2023
  • Number of updates: 25
  • Update frequency: every 107.2 days
  • Top authors: GregRoss (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,019 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
Install script ran successfully

Server metrics [RAM: ▼0.00MB] [CPU: ▼8.09ms] Passed 4 tests

This is a short check of server-side resources used by GP Use Slug for Downloads
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0142.18 ▼0.70
Dashboard /wp-admin3.31 ▼0.0348.32 ▼14.97
Posts /wp-admin/edit.php3.36 ▲0.0149.13 ▼1.65
Add New Post /wp-admin/post-new.php5.89 ▲0.0189.42 ▼15.05
Media Library /wp-admin/upload.php3.23 ▲0.0135.64 ▲0.49

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for GP Use Slug for Downloads
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲6914.48 ▲0.312.22 ▼0.4041.86 ▼0.77
Dashboard /wp-admin2,221 ▲154.90 ▼0.98111.39 ▲4.8040.19 ▼5.00
Posts /wp-admin/edit.php2,100 ▼01.97 ▼0.0340.30 ▲0.7737.21 ▼2.55
Add New Post /wp-admin/post-new.php1,549 ▲523.37 ▼0.19630.00 ▲18.5751.54 ▼5.49
Media Library /wp-admin/upload.php1,397 ▼04.21 ▼0.0599.30 ▼7.0743.39 ▼0.43

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • 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)
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors 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/gp-use-slug-for-downloads/gp-use-slug-for-downloads.php:34

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
2 plugin tags: glotpress, translation

gp-use-slug-for-downloads/gp-use-slug-for-downloads.php Passed 13 tests

The entry point to "GP Use Slug for Downloads" version 1.0 is a PHP file that has certain tags in its header comment area
68 characters long description:
Use the translation set slug for the name of the download file name.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
There were no executable files found in this plugin18 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1101318

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity3.00
▷ Minimum class complexity3.00
▷ Maximum class complexity3.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods2
▷ Static methods00.00%
▷ Public methods2100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There were not PNG files found in your plugin