74% permalink-history

Code Review | Permalink History

WordPress plugin Permalink History scored74%from 54 tests.

About plugin

  • Plugin page: permalink-history
  • Plugin version: 1.0.5
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.7.0
  • WordPress version: 6.3.1
  • First release: Aug 29, 2019
  • Latest release: Mar 10, 2021
  • Number of updates: 9
  • Update frequency: every 111.1 days
  • Top authors: EdwardBock (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /775 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.19MB] [CPU: ▼0.60ms] Passed 4 tests

An overview of server-side resources used by Permalink History
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.66 ▲0.2041.31 ▲3.92
Dashboard /wp-admin3.53 ▲0.2252.35 ▲6.91
Posts /wp-admin/edit.php3.58 ▲0.2248.20 ▲2.32
Add New Post /wp-admin/post-new.php6.06 ▲0.1789.51 ▼11.56
Media Library /wp-admin/upload.php3.39 ▲0.1633.85 ▲2.91

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 23 new files
Database: 1 new table, 6 new options
New tables
wp_permalink_history
New WordPress options
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Permalink History
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲7913.17 ▼1.231.95 ▲0.0941.58 ▲0.27
Dashboard /wp-admin2,206 ▲155.90 ▲0.00107.26 ▲2.4336.92 ▼7.35
Posts /wp-admin/edit.php2,089 ▼32.00 ▼0.0240.28 ▲0.5235.46 ▼0.65
Add New Post /wp-admin/post-new.php6,234 ▲4,70621.65 ▲3.23839.20 ▲220.0159.37 ▲4.45
Media Library /wp-admin/upload.php1,391 ▼04.19 ▲0.0095.18 ▼2.2344.11 ▲1.46

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • The uninstall procedure failed, leaving 1 table in the database
    • wp_permalink_history
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Palasthotel\\PermalinkHistory\\plugin_dir_path() in wp-content/plugins/permalink-history/Plugin.php:33
    • > PHP Fatal error
      Uncaught Error: Class 'ph_destination' not found in wp-content/plugins/permalink-history/classes/MigratePermalinkHistoryDestination.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
5 plugin tags: protocol, backup, permalink, seo, history

permalink-history/Plugin.php 85% from 13 tests

Analyzing the main PHP file in "Permalink History" version 1.0.5
Please make the necessary changes and fix the following:
  • Domain Path: The domain path points to an invalid folder, "/languages" does not exist
  • Main file name: Name the main plugin file the same as the plugin slug ("permalink-history.php" instead of "Plugin.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin914 lines of code in 20 files:
LanguageFilesBlank linesComment linesLines of code
PHP19218564904
JSON10010

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity7.67
▷ Minimum class complexity1.00
▷ Maximum class complexity44.00
Average method complexity2.20
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes15
▷ Abstract classes00.00%
▷ Concrete classes15100.00%
▷ Final classes00.00%
Methods86
▷ Static methods78.14%
▷ Public methods8396.51%
▷ Protected methods00.00%
▷ Private methods33.49%
Functions6
▷ Named functions233.33%
▷ Anonymous functions466.67%
Constants7
▷ Global constants00.00%
▷ Class constants7100.00%
▷ Public constants7100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There are no PNG files in this plugin