84% tips-shortcode

Code Review | Tips Shortcode

WordPress plugin Tips Shortcode scored84%from 54 tests.

About plugin

  • Plugin page: tips-shortcode
  • Plugin version: 0.2.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8.1-4.2
  • WordPress version: 6.3.1
  • First release: Dec 23, 2014
  • Latest release: Apr 23, 2015
  • Number of updates: 13
  • Update frequency: every 9.4 days
  • Top authors: fpcorso (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,043 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.01MB] [CPU: ▼9.38ms] Passed 4 tests

This is a short check of server-side resources used by Tips Shortcode
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0034.00 ▼3.52
Dashboard /wp-admin3.31 ▼0.0444.17 ▼15.46
Posts /wp-admin/edit.php3.36 ▲0.0046.29 ▼3.93
Add New Post /wp-admin/post-new.php5.89 ▲0.0079.67 ▼14.60
Media Library /wp-admin/upload.php3.24 ▲0.0035.12 ▼0.89

Server storage [IO: ▲0.03MB] [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: 5 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Tips Shortcode
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.59 ▼0.724.49 ▲2.8541.13 ▼0.47
Dashboard /wp-admin2,209 ▲215.83 ▼0.0897.43 ▼3.4940.96 ▲1.87
Posts /wp-admin/edit.php2,089 ▼02.00 ▼0.0640.25 ▼7.3234.34 ▲0.35
Add New Post /wp-admin/post-new.php1,538 ▲523.09 ▼0.10582.12 ▼112.2854.52 ▲6.19
Media Library /wp-admin/upload.php1,382 ▼64.25 ▲0.0298.67 ▼8.3543.89 ▼5.03

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget

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 | 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 fix the following
  • 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/tips-shortcode/tips_shortcode.php:36

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

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
7 plugin tags: notice, help, tipbox, hint, alert...

tips-shortcode/tips_shortcode.php 92% from 13 tests

The entry point to "Tips Shortcode" version 0.2.1 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("tips-shortcode.php" instead of "tips_shortcode.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Good job! No executable or dangerous file extensions detected21 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP122411
CSS1007
Markdown1103

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.00
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%
Functions1
▷ Named functions1100.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
1 PNG file occupies 0.03MB with 0.02MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-1.png27.48KB9.89KB▼ 63.99%