84% slug-or-postid

Code Review | Slug or PostID

WordPress plugin Slug or PostID scored84%from 54 tests.

About plugin

  • Plugin page: slug-or-postid
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-3.4.1
  • WordPress version: 6.3.1
  • First release: Feb 6, 2013
  • Latest release: Feb 6, 2013
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: unimakura (100%)

Code review

54 tests

User reviews

1 review

Install metrics

600+ active /2,698 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.01MB] [CPU: ▼4.48ms] Passed 4 tests

Analyzing server-side resources used by Slug or PostID
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0141.98 ▲0.79
Dashboard /wp-admin3.31 ▲0.0147.53 ▼7.79
Posts /wp-admin/edit.php3.36 ▲0.0149.96 ▲1.23
Add New Post /wp-admin/post-new.php5.89 ▲0.0184.64 ▼12.14
Media Library /wp-admin/upload.php3.23 ▲0.0138.97 ▲4.84

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Slug or PostID
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.25 ▼1.141.70 ▼0.0140.67 ▼9.64
Dashboard /wp-admin2,203 ▲114.85 ▼0.10113.46 ▲1.6142.48 ▼2.63
Posts /wp-admin/edit.php2,092 ▼02.03 ▲0.0442.54 ▲3.3636.51 ▲0.61
Add New Post /wp-admin/post-new.php1,542 ▲918.25 ▼4.84645.55 ▼12.6959.99 ▲7.26
Media Library /wp-admin/upload.php1,388 ▼04.20 ▼0.0198.84 ▼5.4443.65 ▼1.86

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
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The following issues need your attention
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/slug-or-postid/slug-or-postid.php:53

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, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that require attention:
  • Donate link: Invalid URI ("")
You can look at the official readme.txt

slug-or-postid/slug-or-postid.php 92% from 13 tests

The main PHP file in "Slug or PostID" ver. 1.0 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Description: The description should be shorter than 140 characters (currently 524 characters long)

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
Good job! No executable or dangerous file extensions detected28 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP162128

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.75
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

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