64% the-permalinks-cascade

Code Review | The Permalinks Cascade

WordPress plugin The Permalinks Cascade scored64%from 54 tests.

About plugin

  • Plugin page: the-permalinks-ca...
  • Plugin version: 2.2
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.8-6.1
  • WordPress version: 6.3.1
  • First release: Oct 4, 2021
  • Latest release: Mar 26, 2023
  • Number of updates: 11
  • Update frequency: every 49.2 days
  • Top authors: _luigi (100%)

Code review

54 tests

User reviews

1 review

Install metrics

70+ active /925 total downloads

Benchmarks

Plugin footprint 48% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.49MB] [CPU: ▼3.63ms] Passed 4 tests

An overview of server-side resources used by The Permalinks Cascade
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.85 ▲0.3944.40 ▲1.39
Dashboard /wp-admin3.82 ▲0.4750.49 ▼9.98
Posts /wp-admin/edit.php3.95 ▲0.5947.73 ▲2.53
Add New Post /wp-admin/post-new.php6.51 ▲0.6283.50 ▼7.02
Media Library /wp-admin/upload.php3.74 ▲0.5134.54 ▲1.10
Dashboard /wp-admin/admin.php?page=tpc-dashboard3.9736.63
Topics /wp-admin/edit-tags.php?taxonomy=tpc_topic&post_type=page3.7334.36
Advanced Settings /wp-admin/admin.php?page=tpc-advanced3.8634.97

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 82 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
widget_recent-comments
the_permalinks_cascade
widget_recent-posts
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for The Permalinks Cascade
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,859 ▲12413.26 ▼1.111.77 ▼0.1241.85 ▼8.86
Dashboard /wp-admin2,263 ▲725.84 ▼0.06100.10 ▼17.2035.22 ▼7.77
Posts /wp-admin/edit.php2,189 ▲1002.02 ▲0.0335.40 ▼1.1232.94 ▼1.58
Add New Post /wp-admin/post-new.php6,244 ▲4,71126.19 ▲2.93885.28 ▲207.3359.07 ▼1.87
Media Library /wp-admin/upload.php1,445 ▲604.26 ▲0.0697.61 ▼17.0339.43 ▼9.89
Dashboard /wp-admin/admin.php?page=tpc-dashboard2,6621.8734.2636.68
Topics /wp-admin/edit-tags.php?taxonomy=tpc_topic&post_type=page1,2932.1435.6129.34
Advanced Settings /wp-admin/admin.php?page=tpc-advanced8341.9533.7525.90

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • The plugin did not uninstall gracefully
    • > Compile error in wp-content/plugins/the-permalinks-cascade/library/base-plugin.class.php+11
    Cannot declare class ThePermalinksCascade\BasePlugin, because the name is already in use
  • The plugin did not uninstall successfully, leaving 82 files (1.16MB) in the plugin directory
    • (new file) admin/edit-box-controller.class.php
    • (new file) admin/admin-controller.class.php
    • (new file) admin/page-view-delegate-protocols.php
    • (new file) admin/meta-box-controller.class.php
    • (new file) admin/field-view.class.php
    • (new file) admin/page-controller-classes.php
    • (new file) admin/page-view.class.php
    • (new file) admin/ping-controller.class.php
    • (new file) admin/index.php
    • (new file) admin/dashboard-page-view.class.php
    • ...
  • The uninstall procedure has failed, leaving 8 options in the database
    • db_upgraded
    • recovery_mode_email_last_sent
    • widget_recent-posts
    • widget_theysaidso_widget
    • the_permalinks_cascade
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

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 take a closer look at the following
  • 13× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'ThePermalinksCascade\\GoogleSitemapBuilder' not found in wp-content/plugins/the-permalinks-cascade/includes/builders/media-sitemap-builder.class.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'ThePermalinksCascade\\BuilderCore' not found in wp-content/plugins/the-permalinks-cascade/includes/builders/site-tree-builder.class.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'ThePermalinksCascade\\PageView' not found in wp-content/plugins/the-permalinks-cascade/admin/dashboard-page-view.class.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'ThePermalinksCascade\\View' not found in wp-content/plugins/the-permalinks-cascade/admin/page-view.class.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'ThePermalinksCascade\\GoogleSitemapBuilder' not found in wp-content/plugins/the-permalinks-cascade/includes/builders/sitemap-builder.class.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'ThePermalinksCascade\\PluginUpgrader' not found in wp-content/plugins/the-permalinks-cascade/includes/upgrader.class.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'ThePermalinksCascade\\BuilderCore' not found in wp-content/plugins/the-permalinks-cascade/includes/builders/google-sitemap-builder.class.php:11
    • > PHP Fatal error
      Uncaught Error: Interface 'ThePermalinksCascade\\PageViewDelegateProtocol' not found in wp-content/plugins/the-permalinks-cascade/admin/page-controller-classes.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'ThePermalinksCascade\\GoogleSitemapBuilder' not found in wp-content/plugins/the-permalinks-cascade/includes/builders/newsmap-builder.class.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'ThePermalinksCascade\\PluginUpgrader' not found in wp-content/plugins/the-permalinks-cascade/includes/sitetree-migrator.class.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 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
5 plugin tags: blocks, google sitemap, news sitemap, html site map, lists

the-permalinks-cascade/the-permalinks-cascade.php Passed 13 tests

This is the main PHP file of "The Permalinks Cascade" version 2.2, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
33 characters long description:
Sitemaps, Hyper-lists and Beyond.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected10,190 lines of code in 63 files:
LanguageFilesBlank linesComment linesLines of code
PHP472,5094,0448,571
JavaScript810330705
CSS38516673
JSON500241

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity19.51
▷ Minimum class complexity1.00
▷ Maximum class complexity105.00
Average method complexity3.07
▷ Minimum method complexity1.00
▷ Maximum method complexity26.00
Code structure
Namespaces3
Interfaces4
Traits0
Classes51
▷ Abstract classes713.73%
▷ Concrete classes4486.27%
▷ Final classes2863.64%
Methods512
▷ Static methods81.56%
▷ Public methods37172.46%
▷ Protected methods458.79%
▷ Private methods9618.75%
Functions7
▷ Named functions457.14%
▷ Anonymous functions342.86%
Constants16
▷ Global constants318.75%
▷ Class constants1381.25%
▷ Public constants13100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 PNG file occupies 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
resources/thumbnail.png11.70KB6.48KB▼ 44.61%