84% tw-shortcodes

Code Review | TW Shortcodes

WordPress plugin TW Shortcodes scored84%from 54 tests.

About plugin

  • Plugin page: tw-shortcodes
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-4.6.1
  • WordPress version: 6.3.1
  • First release: Oct 22, 2016
  • Latest release: Oct 23, 2016
  • Number of updates: 2
  • Update frequency: every 0.5 days
  • Top authors: lvraa (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,052 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
The plugin installed successfully, without throwing any errors or notices

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

An overview of server-side resources used by TW Shortcodes
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0138.63 ▼1.05
Dashboard /wp-admin3.31 ▲0.0049.77 ▼3.45
Posts /wp-admin/edit.php3.36 ▲0.0054.93 ▲4.43
Add New Post /wp-admin/post-new.php5.89 ▲0.0092.00 ▼11.10
Media Library /wp-admin/upload.php3.23 ▲0.0035.10 ▼1.14

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

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

Browser metrics Passed 4 tests

Checking browser requirements for TW Shortcodes
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,947 ▲20114.81 ▲0.1429.20 ▲27.5740.75 ▲0.04
Dashboard /wp-admin2,206 ▲305.86 ▲0.05113.01 ▼1.1541.96 ▼6.64
Posts /wp-admin/edit.php2,089 ▼32.13 ▲0.1440.01 ▲0.6336.45 ▼5.16
Add New Post /wp-admin/post-new.php1,542 ▲718.18 ▼4.95602.58 ▼48.8150.91 ▼5.15
Media Library /wp-admin/upload.php1,385 ▼64.22 ▲0.0298.00 ▼2.3041.78 ▼1.30

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments

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
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
Almost there! Just fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/tw-shortcodes/tw-shortcodes.php:19

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 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:
  • Screenshots: Please add images for these screenshots: #1 (Flat buttons with size, color, icon, link and alignment options), #3 (Flat boxes with color and alignment options), #4 (Flat HDMI Icons courtesy of Genericons), #5 (Tabs, Toggles, Accordions), #6 (Google Maps), #7 (Pricing Tables)
You can take inspiration from this readme.txt

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

The primary PHP file in "TW Shortcodes" version 1.1 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Description: The description should be shorter than 140 characters (currently 220 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Success! There were no dangerous files found in this plugin1,613 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
CSS25436687
HTML1565381
PHP18982339
SVG100113
Markdown124048
JavaScript118445

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.18
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%
Functions37
▷ Named functions37100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There were not PNG files found in your plugin