84% pta-shortcodes

Code Review | PTA Shortcodes

WordPress plugin PTA Shortcodes scored84%from 54 tests.

About plugin

  • Plugin page: pta-shortcodes
  • Plugin version: 1.5.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9-5.5.1
  • WordPress version: 6.3.1
  • First release: Oct 28, 2016
  • Latest release: Sep 21, 2020
  • Number of updates: 21
  • Update frequency: every 67.8 days
  • Top authors: DBAR Productions (100%)

Code review

54 tests

User reviews

1 review

Install metrics

400+ active /11,307 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
Installer ran successfully

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

Analyzing server-side resources used by PTA Shortcodes
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0135.98 ▼4.10
Dashboard /wp-admin3.31 ▼0.0343.44 ▼16.47
Posts /wp-admin/edit.php3.36 ▲0.0146.85 ▲1.09
Add New Post /wp-admin/post-new.php5.89 ▲0.0187.39 ▼13.84
Media Library /wp-admin/upload.php3.23 ▲0.0131.67 ▼3.06

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
db_upgraded
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

PTA Shortcodes: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.54 ▼0.811.78 ▲0.0740.48 ▼3.60
Dashboard /wp-admin2,206 ▲185.84 ▲0.9396.91 ▼21.0537.52 ▼5.04
Posts /wp-admin/edit.php2,089 ▼02.00 ▼0.0140.61 ▲2.5134.43 ▲1.87
Add New Post /wp-admin/post-new.php1,532 ▲1823.34 ▲5.77638.29 ▼33.0457.35 ▲8.64
Media Library /wp-admin/upload.php1,388 ▼04.22 ▲0.0194.90 ▼8.3141.12 ▼5.42

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
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please take a closer look at the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/pta-shortcodes/pta-shortcodes.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
8 plugin tags: events, shortcode generator, shortcodes, member directory, sign up...

pta-shortcodes/pta-shortcodes.php 92% from 13 tests

The entry point to "PTA Shortcodes" version 1.5.0 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 182 characters long)

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
Success! There were no dangerous files found in this plugin244 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript110222
PHP15822

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.40
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%
Functions3
▷ Named functions3100.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
No PNG files were detected