84% wp-shortcm

Code Review | short.io

WordPress plugin short.io scored84%from 54 tests.

About plugin

  • Plugin page: wp-shortcm
  • Plugin version: 2.4.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9-6.0.2
  • WordPress version: 6.3.1
  • First release: Jun 1, 2016
  • Latest release: Sep 2, 2022
  • Number of updates: 11
  • Update frequency: every 208.4 days
  • Top authors: gugu (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /2,637 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
Install script ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼9.87ms] Passed 4 tests

This is a short check of server-side resources used by short.io
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0338.04 ▼5.90
Dashboard /wp-admin3.34 ▼0.0049.05 ▼16.36
Posts /wp-admin/edit.php3.40 ▲0.0447.60 ▼4.42
Add New Post /wp-admin/post-new.php5.94 ▲0.0686.53 ▼12.78
Media Library /wp-admin/upload.php3.27 ▲0.0443.84 ▲5.75
Short.io links /wp-admin/options-general.php?page=shortlist_io3.2134.22

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for short.io
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5413.37 ▼0.744.45 ▲2.8042.34 ▼3.24
Dashboard /wp-admin2,210 ▲364.95 ▼0.6894.00 ▼0.4438.41 ▼9.09
Posts /wp-admin/edit.php2,134 ▲342.33 ▲0.3246.54 ▲8.5732.31 ▼1.34
Add New Post /wp-admin/post-new.php1,540 ▲1223.48 ▲0.57700.29 ▼4.6355.80 ▲8.87
Media Library /wp-admin/upload.php1,415 ▲184.41 ▲0.19109.42 ▲5.8845.65 ▼3.52
Short.io links /wp-admin/options-general.php?page=shortlist_io6711.6520.3422.18

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

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
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/wp-shortcm/includes/functions.php:231
    • > PHP Fatal error
      Uncaught Error: Call to undefined function shortcm() in wp-content/plugins/wp-shortcm/includes/class.wp-shortcm-admin.php:54

User-side errors Passed 1 test

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

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
Please fix the following attributes:
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === wp-shortcm === )
Please take inspiration from this readme.txt

wp-shortcm/wp-shortcm.php 92% from 13 tests

The primary PHP file in "short.io" version 2.4.0 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Description: Keep the plugin description shorter than 140 characters (currently 183 characters long)

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
Success! There were no dangerous files found in this plugin841 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP4284323655
JavaScript1311178
make1007
CSS1001

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity30.50
▷ Minimum class complexity12.00
▷ Maximum class complexity49.00
Average method complexity2.66
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes150.00%
Methods37
▷ Static methods25.41%
▷ Public methods37100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions12
▷ Named functions12100.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants7100.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
1 PNG file occupies 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
shortlink_copy.png8.22KB3.76KB▼ 54.30%