72% tr-all-shortcodes

Code Review | TR All Shortcodes

WordPress plugin TR All Shortcodes scored72%from 54 tests.

About plugin

  • Plugin page: tr-all-shortcodes
  • Plugin version: 1.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 1.0.9-3.8
  • WordPress version: 6.3.1
  • First release: Sep 17, 2013
  • Latest release: Jan 2, 2014
  • Number of updates: 5
  • Update frequency: every 21.6 days
  • Top authors: pntrinh (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,062 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

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

An overview of server-side resources used by TR All Shortcodes
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0036.66 ▼1.21
Dashboard /wp-admin3.31 ▲0.0146.40 ▼10.76
Posts /wp-admin/edit.php3.36 ▲0.0045.91 ▼3.95
Add New Post /wp-admin/post-new.php5.89 ▲0.0081.44 ▼17.06
Media Library /wp-admin/upload.php3.23 ▲0.0032.97 ▼3.97
All Shortcodes /wp-admin/options-general.php?page=trlist_shortcodes3.1729.38

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

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

Browser metrics Passed 4 tests

Checking browser requirements for TR All Shortcodes
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5814.48 ▲0.051.79 ▼0.0544.71 ▲2.38
Dashboard /wp-admin2,213 ▲254.86 ▼0.05107.31 ▼9.8437.18 ▼4.82
Posts /wp-admin/edit.php2,093 ▲41.98 ▼0.0740.15 ▲2.1633.00 ▼0.77
Add New Post /wp-admin/post-new.php1,536 ▲2223.18 ▲5.64607.33 ▼55.3349.60 ▼19.66
Media Library /wp-admin/upload.php1,392 ▲14.19 ▼0.02108.85 ▲0.8547.96 ▲0.42
All Shortcodes /wp-admin/options-general.php?page=trlist_shortcodes8282.2225.2027.06

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
These errors were triggered by the plugin
    • > GET request to /wp-admin/options-general.php?page=trlist_shortcodes
    • > Notice in wp-content/plugins/tr-all-shortcodes/inc/admin.php+16
    Undefined index: act
    • > GET request to /wp-admin/options-general.php?page=trlist_shortcodes
    • > User deprecated in wp-includes/functions.php+5737
    Function get_bloginfo was called with an argument that is deprecated since version 2.2.0! The home option is deprecated for the family of bloginfo() functions. Use the url option instead.

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 3× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/tr-all-shortcodes/pages/admin_find.php
    • > /wp-content/plugins/tr-all-shortcodes/pages/admin_help.php
    • > /wp-content/plugins/tr-all-shortcodes/pages/admin_fix.php
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function bloginfo() in wp-content/plugins/tr-all-shortcodes/pages/admin_all.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/tr-all-shortcodes/plug.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/tr-all-shortcodes/inc/admin.php:2

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)
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
5 plugin tags: find shortcode, shortcode, list shortcodes, fix shortcode, all shortcode

tr-all-shortcodes/plug.php 92% from 13 tests

The entry point to "TR All Shortcodes" version 1.0.3 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("tr-all-shortcodes.php" instead of "plug.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
There were no executable files found in this plugin152 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP7139152

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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