10% roasted-url-shortener

Code Review | Roasted Url Shortener

WordPress plugin Roasted Url Shortener scored10%from 54 tests.

About plugin

  • Plugin page: roasted-url-short...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.5.2
  • WordPress version: 6.3.1
  • First release: May 24, 2016
  • Latest release: May 25, 2016
  • Number of updates: 6
  • Update frequency: every 0.2 days
  • Top authors: anshulsojatia (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /687 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
You still need to fix the following installer errors
  • Install procedure had errors
    • > Warning in wp-content/plugins/roasted-url-shortener/urlshortener.php+11
    require_once(urlshortnerdb.php): failed to open stream: No such file or directory

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

Server-side resources used by Roasted Url Shortener
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0044.49 ▲2.40
Dashboard /wp-admin3.31 ▼0.0457.88 ▼8.82
Posts /wp-admin/edit.php3.36 ▲0.0049.36 ▼2.34
Add New Post /wp-admin/post-new.php5.89 ▲0.0096.30 ▼4.06
Media Library /wp-admin/upload.php3.23 ▲0.0034.77 ▼1.92

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Roasted Url Shortener
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲5413.41 ▼0.881.94 ▼0.0044.61 ▲0.10
Dashboard /wp-admin2,218 ▲155.80 ▲0.9497.56 ▼19.1243.66 ▼1.75
Posts /wp-admin/edit.php2,100 ▼02.00 ▼0.0940.64 ▲3.7737.94 ▲3.05
Add New Post /wp-admin/post-new.php1,540 ▼322.98 ▼0.22587.89 ▼94.0262.74 ▲8.43
Media Library /wp-admin/upload.php1,400 ▼34.21 ▼0.1098.90 ▼6.7842.98 ▼4.16

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • 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 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Warning
      require_once(urlshortnerdb.php): failed to open stream: No such file or directory in wp-content/plugins/roasted-url-shortener/urlshortener.php on line 11
    • > PHP Fatal error
      require_once(): Failed opening required 'urlshortnerdb.php' (include_path='.:/usr/share/php') in wp-content/plugins/roasted-url-shortener/urlshortener.php on line 11

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
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 is important because it is parsed by WordPress.org for the public listing of your plugin
Please fix the following attributes:
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === roasted-url-shortener === )
You can look at the official readme.txt

roasted-url-shortener/urlshortener.php 92% from 13 tests

"Roasted Url Shortener" version 1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please take the time to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("roasted-url-shortener.php" instead of "urlshortener.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin135 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP22628135

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity10.00
▷ Minimum class complexity4.00
▷ Maximum class complexity16.00
Average method complexity2.50
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods12
▷ Static methods00.00%
▷ Public methods12100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There are no PNG files in this plugin