84% shorten-subcategorys-link

Code Review | Shorten Sub-category's Link

WordPress plugin Shorten Sub-category's Link scored84%from 54 tests.

About plugin

  • Plugin page: shorten-subcatego...
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.8
  • WordPress version: 6.3.1
  • First release: Aug 20, 2015
  • Latest release: Sep 18, 2017
  • Number of updates: 12
  • Update frequency: every 63.3 days
  • Top authors: mcjambi (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /1,273 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.00MB] [CPU: ▼0.94ms] Passed 4 tests

Analyzing server-side resources used by Shorten Sub-category's Link
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0034.74 ▼5.18
Dashboard /wp-admin3.31 ▲0.0042.43 ▼3.58
Posts /wp-admin/edit.php3.36 ▲0.0044.76 ▲1.93
Add New Post /wp-admin/post-new.php5.89 ▲0.0089.88 ▲3.76
Media Library /wp-admin/upload.php3.23 ▲0.0034.31 ▲3.07

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
can_compress_scripts
widget_recent-posts
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by Shorten Sub-category's Link
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.27 ▼0.151.78 ▲0.1338.85 ▼0.41
Dashboard /wp-admin2,198 ▲275.64 ▲0.0582.11 ▼6.6340.16 ▼1.46
Posts /wp-admin/edit.php2,097 ▼31.98 ▼0.0134.18 ▼1.7331.77 ▼6.74
Add New Post /wp-admin/post-new.php1,526 ▼223.53 ▲0.55677.40 ▲4.8254.85 ▼8.12
Media Library /wp-admin/upload.php1,400 ▲34.23 ▼0.0296.29 ▼7.7544.71 ▲0.84

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
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
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
Please fix the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/shorten-subcategorys-link/shorten-subcategory-link.php:16

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 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
7 plugin tags: nice slug, shorten subcategory link, shorten url, subcategory url, shorten category link...

shorten-subcategorys-link/shorten-subcategory-link.php 85% from 13 tests

The primary PHP file in "Shorten Sub-category's Link" version 1.2 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 225 characters long)
  • Main file name: The principal plugin file should be the same as the plugin slug ("shorten-subcategorys-link.php" instead of "shorten-subcategory-link.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous files found in this plugin51 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1162251

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.13
Average class complexity2.00
▷ Minimum class complexity2.00
▷ Maximum class complexity2.00
Average method complexity1.33
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods3
▷ Static methods00.00%
▷ Public methods3100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
3 PNG files occupy 0.13MB with 0.07MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png52.63KB26.34KB▼ 49.96%
banner-1544x500.png54.98KB24.04KB▼ 56.27%
banner-772x250.png25.07KB10.89KB▼ 56.58%