68% wp-shortcut-link

Code Review | wp shortcut link and advertisement baner

WordPress plugin wp shortcut link and advertisement baner scored68%from 54 tests.

About plugin

  • Plugin page: wp-shortcut-link
  • Plugin version: 1.2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.2.3
  • WordPress version: 6.3.1
  • First release: Dec 10, 2019
  • Latest release: Dec 11, 2019
  • Number of updates: 3
  • Update frequency: every 0.3 days
  • Top authors: behzadrohizadeh (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /697 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼0.25MB] [CPU: ▼13.08ms] Passed 4 tests

A check of server-side resources used by wp shortcut link and advertisement baner
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0342.95 ▼1.12
Dashboard /wp-admin3.35 ▲0.0057.88 ▼6.36
Posts /wp-admin/edit.php3.47 ▲0.1152.43 ▲1.28
Add New Post /wp-admin/post-new.php4.84 ▼1.0458.79 ▼43.76
Media Library /wp-admin/upload.php3.25 ▲0.0335.99 ▼1.07
Add New /wp-admin/admin.php?page=wpslab_add_new2.8219.48
shortcut link /wp-admin/admin.php?page=wpslab_all_cat3.2538.67

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 51 new files
Database: 2 new tables, 6 new options
New tables
wp_wpslab
wp_wpslab_client
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for wp shortcut link and advertisement baner
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,100 ▲31415.46 ▲1.1710.69 ▲8.5342.50 ▼0.14
Dashboard /wp-admin2,366 ▲1896.23 ▲0.58104.81 ▲4.4839.05 ▼5.25
Posts /wp-admin/edit.php2,297 ▲1973.43 ▲1.4146.62 ▲10.4830.12 ▼4.41
Add New Post /wp-admin/post-new.php1,717 ▲19122.50 ▲4.98653.94 ▼2.9629.50 ▼19.10
Media Library /wp-admin/upload.php1,434 ▲314.20 ▼0.0684.76 ▼17.4746.71 ▲1.26
Add New /wp-admin/admin.php?page=wpslab_add_new6,0054.1648.9971.04
shortcut link /wp-admin/admin.php?page=wpslab_all_cat1,0423.0439.0025.81

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • This plugin does not fully uninstall, leaving 2 tables in the database
    • wp_wpslab
    • wp_wpslab_client
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

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
The following issues need your attention
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-shortcut-link/client.php:2

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Please take a look at the following user-side issues
    • > GET request to /wp-admin/admin.php?page=wpslab_all_cat
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=6.3.1 1:28609 "jQuery.Deferred exception: Cannot read properties of null (reading 'getAttribute')" "TypeError: Cannot read properties of null (reading 'getAttribute')\n at iframedesine (/wp-content/plugins/wp-shortcut-link/js/wpslab.js?ver=6.3.1:547:75)\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/wp-shortcut-link/js/wpslab.js?ver=6.3.1:470:1)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=6.3.1:2:27292)" undefined
    • > GET request to /wp-admin/admin.php?page=wpslab_all_cat
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=6.3.1 1:28721 Uncaught TypeError: Cannot read properties of null (reading 'getAttribute')

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 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
6 plugin tags: wordpress, shortcut, plugin, baner, advertisement...

wp-shortcut-link/wp-shortcut-link-advertisement.php 92% from 13 tests

The primary PHP file in "wp shortcut link and advertisement baner" version 1.2.0 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("wp-shortcut-link.php" instead of "wp-shortcut-link-advertisement.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected3,562 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
PHP8173222,038
CSS3827989
JavaScript338143485
PO File1141450

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.20
Average class complexity5.25
▷ Minimum class complexity1.00
▷ Maximum class complexity12.00
Average method complexity1.94
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods18
▷ Static methods00.00%
▷ Public methods18100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
30 PNG files occupy 0.06MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/col633.png1.02KB0.77KB▼ 24.57%
screenshot-5.png7.80KB3.83KB▼ 50.86%
img/col552.png1.12KB0.86KB▼ 23.32%
img/col235.png1.12KB0.84KB▼ 25.30%
img/col525.png1.01KB0.81KB▼ 19.83%