10% wordpress-shortcodes-api

Code Review | WP Shortcodes API

WordPress plugin WP Shortcodes API scored10%from 54 tests.

About plugin

  • Plugin page: wordpress-shortco...
  • Plugin version: 0.8
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.4.2
  • WordPress version: 6.3.1
  • First release: Feb 1, 2012
  • Latest release: Oct 18, 2012
  • Number of updates: 9
  • Update frequency: every 66.6 days
  • Top authors: markparolisi (77.78%)smccafferty (33.33%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,578 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
These installer errors require your attention
  • The plugin cannot be installed
    • > Error in wp-content/plugins/wordpress-shortcodes-api/wp-shortcodes-api.php+340
    Cannot redeclare has_shortcode() (previously declared in wp-includes/shortcodes.php:149)

Server metrics [RAM: ▲0.00MB] [CPU: ▼2.03ms] Passed 4 tests

A check of server-side resources used by WP Shortcodes API
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0035.27 ▼3.36
Dashboard /wp-admin3.31 ▲0.0046.59 ▼3.05
Posts /wp-admin/edit.php3.36 ▲0.0046.24 ▼3.55
Add New Post /wp-admin/post-new.php5.89 ▲0.0091.24 ▲1.86
Media Library /wp-admin/upload.php3.23 ▲0.0035.92 ▲2.89

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for WP Shortcodes API
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.19 ▼0.991.64 ▼0.6037.62 ▼6.06
Dashboard /wp-admin2,206 ▲184.82 ▼0.08104.37 ▼14.8339.02 ▼8.46
Posts /wp-admin/edit.php2,089 ▼02.00 ▼0.1340.16 ▲0.2235.28 ▼0.48
Add New Post /wp-admin/post-new.php1,533 ▼023.34 ▲0.04605.84 ▼58.0951.57 ▼2.20
Media Library /wp-admin/upload.php1,388 ▲64.16 ▼0.0994.19 ▼2.8541.64 ▼3.38

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
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
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
Please fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/wordpress-shortcodes-api/demo_shortcode.php:27

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 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need your attention:
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === wordpress-shortcodes-api === )
Please take inspiration from this readme.txt

wordpress-shortcodes-api/wp-shortcodes-api.php 92% from 13 tests

"WP Shortcodes API" version 0.8's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
It is important to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("wordpress-shortcodes-api.php" instead of "wp-shortcodes-api.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Good job! No executable or dangerous file extensions detected337 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP24092243
JavaScript123594

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity11.33
▷ Minimum class complexity6.00
▷ Maximum class complexity18.00
Average method complexity2.55
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods20
▷ Static methods315.00%
▷ Public methods1470.00%
▷ Protected methods00.00%
▷ Private methods630.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
shortcode-icon.png1.00KB0.16KB▼ 84.18%