10% wp-hashed-ids

Code Review | WP Hashed IDs

WordPress plugin WP Hashed IDs scored10%from 54 tests.

About plugin

  • Plugin page: wp-hashed-ids
  • Plugin version: 2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.5.3
  • WordPress version: 6.3.1
  • First release: Oct 14, 2012
  • Latest release: Jul 18, 2016
  • Number of updates: 8
  • Update frequency: every 171.6 days
  • Top authors: palicao (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

100+ active /3,377 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
It is recommended to fix the following installer errors
  • The plugin did not install without errors
    • > Notice in wp-includes/functions.php+6691
    file_get_contents(): read of 8192 bytes failed with errno=21 Is a directory

Server metrics [RAM: ▲0.08MB] [CPU: ▼0.15ms] Passed 4 tests

A check of server-side resources used by WP Hashed IDs
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0844.16 ▲0.60
Dashboard /wp-admin3.39 ▲0.0853.45 ▼1.28
Posts /wp-admin/edit.php3.50 ▲0.1454.03 ▲1.63
Add New Post /wp-admin/post-new.php5.97 ▲0.08100.62 ▼1.56
Media Library /wp-admin/upload.php3.31 ▲0.0840.02 ▲2.16
WP Hashed Ids /wp-admin/options-general.php?page=wp_hashed_ids3.2535.51

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
can_compress_scripts
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for WP Hashed IDs
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.24 ▼0.321.67 ▼0.2042.93 ▼1.09
Dashboard /wp-admin2,202 ▲225.62 ▼0.0487.12 ▼5.1941.61 ▼1.22
Posts /wp-admin/edit.php2,104 ▲41.99 ▼0.0240.44 ▲0.0636.47 ▼2.89
Add New Post /wp-admin/post-new.php1,529 ▲123.80 ▲0.75676.63 ▲5.6458.08 ▼5.79
Media Library /wp-admin/upload.php1,407 ▲74.20 ▲0.0194.13 ▼7.1946.99 ▲3.50
WP Hashed Ids /wp-admin/options-general.php?page=wp_hashed_ids8332.0323.6229.60

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% 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
  • Uninstall procedure had uncaught errors
    • > Notice in wp-includes/functions.php+6691
    file_get_contents(): read of 8192 bytes failed with errno=21 Is a directory
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These errors were triggered by the plugin
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=wp_hashed_ids
    • > Notice in wp-content/plugins/wp-hashed-ids/settings.php+54
    Trying to access array offset on value of type bool

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
Please take a closer look at the following
  • 3× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-hashed-ids/settings.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-hashed-ids/settings.php:2
    • > PHP Fatal error
      Uncaught Error: Interface 'Hashids\\HashGenerator' not found in wp-content/plugins/wp-hashed-ids/hashids.php/lib/Hashids/Hashids.php:16

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 96% 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
4 plugin tags: url shortening, permalink tag, encryption, permalinks

wp-hashed-ids/wp-hashed-ids.php 92% from 13 tests

The entry point to "WP Hashed IDs" version 2.0 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 325 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected517 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP410662383
Markdown130071
JSON10035
XML10028

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 problems
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity23.50
▷ Minimum class complexity1.00
▷ Maximum class complexity46.00
Average method complexity5.09
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces1
Interfaces1
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods15
▷ Static methods00.00%
▷ Public methods1066.67%
▷ Protected methods00.00%
▷ Private methods533.33%
Functions14
▷ Named functions14100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants00.00%
▷ Class constants6100.00%
▷ Public constants6100.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