84% generate-shortcode

Code Review | Generate Shortcode

WordPress plugin Generate Shortcode scored84%from 54 tests.

About plugin

  • Plugin page: generate-shortcode
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1.0-5.5
  • WordPress version: 6.3.1
  • First release: Jul 27, 2016
  • Latest release: Aug 28, 2020
  • Number of updates: 14
  • Update frequency: every 107.7 days
  • Top authors: Alobaidi (100%)

Code review

54 tests

User reviews

1 review

Install metrics

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

Server metrics [RAM: ▲0.03MB] [CPU: ▼7.57ms] Passed 4 tests

An overview of server-side resources used by Generate Shortcode
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0538.43 ▼5.69
Dashboard /wp-admin3.35 ▲0.0045.25 ▼14.67
Posts /wp-admin/edit.php3.40 ▲0.0448.86 ▲5.04
Add New Post /wp-admin/post-new.php5.93 ▲0.0479.86 ▼13.33
Media Library /wp-admin/upload.php3.27 ▲0.0437.62 ▲3.40
All Shortcodes /wp-admin/edit.php?post_type=generate_shortcode3.3134.28
Add New /wp-admin/post-new.php?post_type=generate_shortcode3.3644.63

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

Generate Shortcode: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,830 ▲8413.21 ▼1.021.62 ▼0.1744.17 ▲0.28
Dashboard /wp-admin2,230 ▲455.86 ▲0.9996.06 ▼3.4539.12 ▼2.53
Posts /wp-admin/edit.php2,113 ▲242.00 ▼0.0140.30 ▲2.9633.94 ▼1.48
Add New Post /wp-admin/post-new.php1,556 ▲2423.38 ▼0.18678.03 ▲61.1655.22 ▼6.20
Media Library /wp-admin/upload.php1,418 ▲274.32 ▲0.07103.89 ▲5.7544.90 ▲1.88
All Shortcodes /wp-admin/edit.php?post_type=generate_shortcode1,0632.0031.9826.90
Add New /wp-admin/post-new.php?post_type=generate_shortcode2,1917.61166.0461.19

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

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

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
Please fix the following
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/generate-shortcode/generate-shortcode.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
10 plugin tags: make shortcode, custom shortcode, adsense, google adsense, shortcodes...

generate-shortcode/generate-shortcode.php Passed 13 tests

The principal PHP file in "Generate Shortcode" v. 1.0.0 is loaded by WordPress automatically on each request
127 characters long description:
Create and Generate your Shortcodes easily, create google adsense shortcodes, unlimited shortcodes, no options and easy to use.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected108 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP23322108

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.22
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%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
There are no PNG files in this plugin