84% wpapi-shortcode-and-widgets

Code Review | WP API Shortcodes

WordPress plugin WP API Shortcodes scored84%from 54 tests.

About plugin

  • Plugin page: wpapi-shortcode-a...
  • Plugin version: 2.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1.0-4.3.1
  • WordPress version: 6.3.1
  • First release: Mar 30, 2015
  • Latest release: Jan 5, 2016
  • Number of updates: 7
  • Update frequency: every 41.9 days
  • Top authors: hideokamoto (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,359 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
This plugin's installer ran successfully

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

This is a short check of server-side resources used by WP API Shortcodes
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0135.28 ▼5.40
Dashboard /wp-admin3.31 ▲0.0045.22 ▼1.11
Posts /wp-admin/edit.php3.36 ▲0.0046.22 ▲1.88
Add New Post /wp-admin/post-new.php5.89 ▲0.0084.11 ▼12.43
Media Library /wp-admin/upload.php3.23 ▲0.0032.36 ▼1.78

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by WP API Shortcodes
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,802 ▲6714.74 ▲0.471.91 ▼0.0244.52 ▼4.52
Dashboard /wp-admin2,206 ▲215.80 ▲0.8999.83 ▼0.3338.96 ▼6.33
Posts /wp-admin/edit.php2,089 ▼32.03 ▲0.0340.97 ▲2.9836.86 ▲4.85
Add New Post /wp-admin/post-new.php1,522 ▲323.24 ▼0.05675.81 ▲30.6955.62 ▼11.25
Media Library /wp-admin/upload.php1,391 ▲34.13 ▼0.0896.18 ▼2.4640.68 ▼3.85

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please take a closer look at the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/wpapi-shortcode-and-widgets/wpapi-get-content.php:31

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

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need to be fixed:
  • Screenshots: Screenshot #1 (No Images) image missing
You can look at the official readme.txt

wpapi-shortcode-and-widgets/wpapi-get-content.php 92% from 13 tests

The main PHP file in "WP API Shortcodes" ver. 2.0.0 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("wpapi-shortcode-and-widgets.php" instead of "wpapi-get-content.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected233 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP31324210
CSS14023

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.54
Average class complexity31.00
▷ Minimum class complexity10.00
▷ Maximum class complexity52.00
Average method complexity11.00
▷ Minimum method complexity1.00
▷ Maximum method complexity47.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods6100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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