94% dw-shortlinks

Code Review | DW Shortlinks

WordPress plugin DW Shortlinks scored 94% from 54 tests.

About plugin

  • Plugin page: dw-shortlinks
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.7.2
  • WordPress version: 5.8.1
  • First release: Feb 6, 2017
  • Latest release: Feb 6, 2017
  • Number of updates: 2
  • Update frequency: every 4.0 days
  • Top authors: designwall (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active / 1,227 total downloads


Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

Server metrics [RAM: ▲0.08MB] [CPU: ▼154.47ms] Passed 4 tests

An overview of server-side resources used by DW Shortlinks
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.91 ▲0.1933.81 ▲6.96
Dashboard /wp-admin3.14 ▲0.0847.80 ▲1.25
Posts /wp-admin/edit.php3.18 ▲0.0847.45 ▼0.57
Add New Post /wp-admin/post-new.php5.50 ▲0.0696.25 ▼619.51
Media Library /wp-admin/upload.php3.08 ▲0.0838.99 ▲0.97
Shortlinks /wp-admin/edit.php?post_type=dw-shortlink3.1239.22
Type /wp-admin/edit-tags.php?taxonomy=dw-shortlink_type&post_type=dw-shortlink3.0838.47
Add New /wp-admin/post-new.php?post_type=dw-shortlink3.1353.35

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 3 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

An overview of browser requirements for DW Shortlinks
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,739 ▲14315.85 ▼0.1310.20 ▲1.0648.80 ▼6.28
Dashboard /wp-admin3,010 ▲795.94 ▲0.00156.61 ▲2.01117.72 ▼9.25
Posts /wp-admin/edit.php2,775 ▲362.69 ▲0.0169.99 ▲1.7499.55 ▼0.54
Add New Post /wp-admin/post-new.php1,523 ▼16018.57 ▼0.20385.31 ▼13.29112.45 ▲0.76
Media Library /wp-admin/upload.php1,843 ▲335.04 ▲0.02168.83 ▲3.26119.20 ▼13.17
Shortlinks /wp-admin/edit.php?post_type=dw-shortlink1,4362.6266.6880.87
Type /wp-admin/edit-tags.php?taxonomy=dw-shortlink_type&post_type=dw-shortlink1,7722.5064.1383.78
Add New /wp-admin/post-new.php?post_type=dw-shortlink2,1383.32113.1185.96

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Uninstall script ran successfully

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 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/dw-shortlinks/dw-shortlinks.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found


Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that require attention:
  • Tags: There are too many tags (36 tag instead of maximum 10)
The official readme.txt is a good inspiration

dw-shortlinks/dw-shortlinks.php 92% from 13 tests

Analyzing the main PHP file in "DW Shortlinks" version 1.0.0
Please take the time to fix the following:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected245 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.46
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
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions15100.00%
▷ Anonymous functions00.00%
▷ 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
There were not PNG files found in your plugin