84% advanced-permalink

Code Review | Advanced Permalink

WordPress plugin Advanced Permalink scored84%from 54 tests.

About plugin

  • Plugin page: advanced-permalink
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-5.7.0
  • WordPress version: 6.3.1
  • First release: Jul 10, 2017
  • Latest release: Apr 5, 2021
  • Number of updates: 5
  • Update frequency: every 273.2 days
  • Top authors: mingocommerce (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /5,631 total downloads

Benchmarks

Plugin footprint 82% 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.02MB] [CPU: ▼2.43ms] 75% from 4 tests

Analyzing server-side resources used by Advanced Permalink
Please take the time to fix the following items
  • CPU: Total CPU usage must kept under 500.00ms (currently 509.68ms on /wp-admin/options-general.php?page=post-type-permalink)
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0139.71 ▼0.85
Dashboard /wp-admin3.32 ▲0.0245.87 ▼2.28
Posts /wp-admin/edit.php3.37 ▲0.0245.19 ▼1.62
Add New Post /wp-admin/post-new.php5.90 ▲0.0282.62 ▼4.96
Media Library /wp-admin/upload.php3.24 ▲0.0235.86 ▲1.28
Advanced Permalinks /wp-admin/options-general.php?page=post-type-permalink3.23509.68

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

Advanced Permalink: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6913.31 ▼0.951.75 ▲0.0441.47 ▼3.70
Dashboard /wp-admin2,213 ▲254.87 ▼1.01106.37 ▼1.6440.16 ▼6.06
Posts /wp-admin/edit.php2,093 ▲42.02 ▲0.0137.29 ▲0.8032.97 ▼2.39
Add New Post /wp-admin/post-new.php1,545 ▲1218.51 ▼4.79645.88 ▼26.0167.57 ▲5.03
Media Library /wp-admin/upload.php1,395 ▲44.17 ▲0.0195.32 ▼8.4143.11 ▲0.70
Advanced Permalinks /wp-admin/options-general.php?page=post-type-permalink7792.0323.4726.03

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 detected upon uninstall: 6 options
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • 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)
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/advanced-permalink/advanced-permalink.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
6 plugin tags: url customize, advanced permalink, permalink customize, permalink, permalink manage...

advanced-permalink/advanced-permalink.php Passed 13 tests

The primary PHP file in "Advanced Permalink" version 1.0.2 is used by WordPress to initiate all plugin functionality
31 characters long description:
Manage Permalinks off all posts

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
Everything looks great! No dangerous files found in this plugin187 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP12611159
PO File16628

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity21.00
▷ Minimum class complexity21.00
▷ Maximum class complexity21.00
Average method complexity2.54
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods13
▷ Static methods00.00%
▷ Public methods13100.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

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG images were found in this plugin