89% disable-media-permalink-by-hardweb-it

Code Review | Disable Media Permalink by Hardweb.it

WordPress plugin Disable Media Permalink by Hardweb.it scored89%from 54 tests.

About plugin

  • Plugin page: disable-media-per...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9.1-6.2
  • WordPress version: 6.3.1
  • First release: May 16, 2018
  • Latest release: Apr 21, 2023
  • Number of updates: 18
  • Update frequency: every 100.1 days
  • Top authors: giangel84 (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

1,000+ active /5,180 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
Install script ran successfully

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

This is a short check of server-side resources used by Disable Media Permalink by Hardweb.it
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0037.38 ▼6.98
Dashboard /wp-admin3.31 ▼0.0351.29 ▼11.90
Posts /wp-admin/edit.php3.36 ▲0.0051.03 ▲0.28
Add New Post /wp-admin/post-new.php5.89 ▲0.0090.84 ▼20.31
Media Library /wp-admin/upload.php3.23 ▲0.0035.67 ▼2.66

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

Browser metrics Passed 4 tests

Disable Media Permalink by Hardweb.it: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.74 ▼0.641.86 ▲0.0843.36 ▲2.24
Dashboard /wp-admin2,206 ▲204.89 ▼0.06104.47 ▼7.1738.81 ▼3.74
Posts /wp-admin/edit.php2,092 ▼02.02 ▲0.0139.81 ▼0.5334.27 ▲2.08
Add New Post /wp-admin/post-new.php1,533 ▼922.86 ▲4.41648.48 ▲13.6854.51 ▲5.91
Media Library /wp-admin/upload.php1,379 ▼94.23 ▲0.0498.14 ▼7.8943.38 ▼3.02

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need your attention:
  • Requires php: Version not formatted correctly
  • Plugin Name: Please specify the plugin name on the first line ( === disable-media-permalink-by-hardweb-it === )
The official readme.txt might help

disable-media-permalink-by-hardweb-it/disable-media-permalink-by-hardweb-it.php 92% from 13 tests

The entry point to "Disable Media Permalink by Hardweb.it" version 1.0 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Description: Please keep the plugin description shorter than 140 characters (currently 176 characters long)

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
Good job! No executable or dangerous file extensions detected19 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP172219

PHP code Passed 2 tests

An short overview of 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 code1.00
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 Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG files were detected