84% wp-amara-shortcode

Code Review | WP Amara Shortcode

WordPress plugin WP Amara Shortcode scored84%from 54 tests.

About plugin

  • Plugin page: wp-amara-shortcode
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.7.1
  • WordPress version: 6.3.1
  • First release: Dec 5, 2013
  • Latest release: Dec 6, 2013
  • Number of updates: 14
  • Update frequency: every 0.1 days
  • Top authors: d79 (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /1,164 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

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

This is a short check of server-side resources used by WP Amara Shortcode
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0035.12 ▼2.40
Dashboard /wp-admin3.31 ▲0.0047.04 ▲0.62
Posts /wp-admin/edit.php3.36 ▲0.0046.22 ▼0.50
Add New Post /wp-admin/post-new.php5.89 ▲0.0077.64 ▼15.74
Media Library /wp-admin/upload.php3.23 ▲0.0031.95 ▼3.60

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
db_upgraded
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by WP Amara Shortcode
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5414.46 ▲0.171.67 ▼0.1837.44 ▼6.50
Dashboard /wp-admin2,209 ▲214.85 ▼0.0699.72 ▼14.6539.83 ▼7.94
Posts /wp-admin/edit.php2,086 ▼32.06 ▲0.0736.24 ▼0.0133.76 ▼0.56
Add New Post /wp-admin/post-new.php1,528 ▲1423.33 ▲5.64661.27 ▼42.3955.49 ▲2.85
Media Library /wp-admin/upload.php1,391 ▲64.27 ▲0.0695.80 ▼12.4142.62 ▼4.69

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments

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

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
Please 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_shortcode() in wp-content/plugins/wp-amara-shortcode/wp_amara_shortcode.php:37

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that require attention:
  • Plugin Name: You should set the name of your plugin on the first line ( === wp-amara-shortcode === )
The official readme.txt might help

wp-amara-shortcode/wp_amara_shortcode.php 92% from 13 tests

The principal PHP file in "WP Amara Shortcode" v. 1.2 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("wp-amara-shortcode.php" instead of "wp_amara_shortcode.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
There were no executable files found in this plugin67 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1233767

PHP code Passed 2 tests

A short 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.48
Average class complexity11.00
▷ Minimum class complexity11.00
▷ Maximum class complexity11.00
Average method complexity4.33
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods3
▷ Static methods00.00%
▷ Public methods266.67%
▷ Protected methods00.00%
▷ Private methods133.33%
Functions0
▷ Named functions00.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
There were not PNG files found in your plugin