83% enable-numeric-slugs

Code Review | Enable Numeric Slugs

WordPress plugin Enable Numeric Slugs scored83%from 54 tests.

About plugin

  • Plugin page: enable-numeric-slugs
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Jan 19, 2018
  • Latest release: Jan 19, 2018
  • Number of updates: 7
  • Update frequency: every 4.7 days
  • Top authors: ayangyuan (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

70+ active /2,020 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼4.44ms] Passed 4 tests

This is a short check of server-side resources used by Enable Numeric Slugs
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.46 ▼0.0136.92 ▼1.44
Dashboard /wp-admin3.31 ▲0.0144.28 ▼10.99
Posts /wp-admin/edit.php3.35 ▼0.0149.13 ▲1.10
Add New Post /wp-admin/post-new.php5.89 ▲0.0185.49 ▼3.03
Media Library /wp-admin/upload.php3.23 ▲0.0134.29 ▼2.30

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
db_upgraded
widget_recent-comments
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Enable Numeric Slugs
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.65 ▼0.544.48 ▲2.7538.21 ▼5.52
Dashboard /wp-admin2,206 ▲185.90 ▲0.85112.38 ▼5.3241.99 ▼3.36
Posts /wp-admin/edit.php2,086 ▼62.04 ▲0.0335.92 ▼5.9033.40 ▼0.36
Add New Post /wp-admin/post-new.php1,536 ▲1723.26 ▼0.02654.89 ▼37.8053.49 ▼1.50
Media Library /wp-admin/upload.php1,388 ▼04.21 ▲0.06101.09 ▼10.4842.14 ▼6.73

Uninstaller [IO: ▲0.00MB] [DB: ▼0.00MB] 75% 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
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • 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
Everything seems fine, however this is by no means an exhaustive test

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 fix the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/enable-numeric-slugs/numeric-slugs.php:33

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 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
Please fix the following attributes:
  • Screenshots: Screenshot #1 (Plug and Play) image not found
You can take inspiration from this readme.txt

enable-numeric-slugs/numeric-slugs.php 85% from 13 tests

The entry point to "Enable Numeric Slugs" version 1.0.1 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("enable-numeric-slugs.php" instead of "numeric-slugs.php")
  • Domain Path: The domain path is invalid: folder "/res/lang" does not exist

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
Success! There were no dangerous files found in this plugin27 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP162527

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.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

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG files were detected