84% qqworld-short-url

Code Review | QQWorld Short Url

WordPress plugin QQWorld Short Url scored84%from 54 tests.

About plugin

  • Plugin page: qqworld-short-url
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.1
  • WordPress version: 6.3.1
  • First release: Dec 22, 2014
  • Latest release: Mar 7, 2015
  • Number of updates: 6
  • Update frequency: every 13.3 days
  • Top authors: qqworld (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /756 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.07MB] [CPU: ▼8.37ms] Passed 4 tests

This is a short check of server-side resources used by QQWorld Short Url
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.80 ▲0.0748.94 ▲5.11
Dashboard /wp-admin3.70 ▲0.1450.03 ▼9.63
Posts /wp-admin/edit.php3.75 ▲0.0751.92 ▼3.23
Add New Post /wp-admin/post-new.php6.22 ▲0.0788.84 ▼21.20
Media Library /wp-admin/upload.php3.56 ▲0.0740.64 ▲0.59
QQWorld Short URL /wp-admin/options-general.php?page=qqworld-short-url3.5336.80

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

QQWorld Short Url: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,818 ▲3214.75 ▲0.141.99 ▼0.1747.34 ▲3.16
Dashboard /wp-admin2,199 ▲195.59 ▼0.1091.82 ▼1.6236.71 ▼5.78
Posts /wp-admin/edit.php2,101 ▲12.00 ▼0.0136.52 ▼2.7932.82 ▼3.04
Add New Post /wp-admin/post-new.php1,549 ▲1823.19 ▼0.11644.92 ▼54.4654.49 ▼5.27
Media Library /wp-admin/upload.php1,398 ▼24.38 ▲0.19103.39 ▼4.5342.02 ▼8.88
QQWorld Short URL /wp-admin/options-general.php?page=qqworld-short-url9122.0627.6927.14

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded

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 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/qqworld-short-url/qqworld-short-url.php:13

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 Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
3 plugin tags: short, url, link

qqworld-short-url/qqworld-short-url.php Passed 13 tests

"QQWorld Short Url" version 1.0.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
59 characters long description:
Automatically generate short link url when publishing post.

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 detected362 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP13419313
PO File1366949

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity16.33
▷ Minimum class complexity2.00
▷ Maximum class complexity45.00
Average method complexity3.30
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods20
▷ Static methods15.00%
▷ Public methods20100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions150.00%
▷ Anonymous functions150.00%
Constants2
▷ Global constants2100.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