84% url-shortcodes

Code Review | URL ShortCodes

WordPress plugin URL ShortCodes scored84%from 54 tests.

About plugin

  • Plugin page: url-shortcodes
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 2.9.0-5.0
  • WordPress version: 6.3.1
  • First release: Mar 4, 2010
  • Latest release: Dec 8, 2018
  • Number of updates: 19
  • Update frequency: every 168.5 days
  • Top authors: cgarvey (100%)

Code review

54 tests

User reviews

1 review

Install metrics

5,000+ active /10,698 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

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

Analyzing server-side resources used by URL ShortCodes
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0038.65 ▼0.83
Dashboard /wp-admin3.31 ▲0.0151.01 ▼0.01
Posts /wp-admin/edit.php3.36 ▲0.0051.10 ▲2.08
Add New Post /wp-admin/post-new.php5.89 ▲0.0088.64 ▼2.96
Media Library /wp-admin/upload.php3.23 ▲0.0035.82 ▼4.38

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for URL ShortCodes
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.27 ▼0.041.72 ▲0.0140.68 ▼6.82
Dashboard /wp-admin2,189 ▲155.59 ▲0.0386.30 ▼4.4540.73 ▲0.72
Posts /wp-admin/edit.php2,100 ▼01.98 ▲0.0138.28 ▲3.1234.94 ▼7.10
Add New Post /wp-admin/post-new.php1,526 ▼223.01 ▼0.21598.90 ▼99.0764.64 ▲12.62
Media Library /wp-admin/upload.php1,403 ▼04.21 ▲0.0196.54 ▼1.5142.98 ▼1.55

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means 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_shortcode() in wp-content/plugins/url-shortcodes/url_short_codes.php:33

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)
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that need to be fixed:
  • Screenshots: Please add images for these screenshots: #1 (Sample short code use.), #2 (Rendered output.)
You can look at the official readme.txt

url-shortcodes/url_short_codes.php 92% from 13 tests

The main PHP script in "URL ShortCodes" version 1.2 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("url-shortcodes.php" instead of "url_short_codes.php")

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 detected15 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP162415

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.40
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%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG files were detected