90% wpsite-shortcode

Code Review | WPSite Shortcode

WordPress plugin WPSite Shortcode scored90%from 54 tests.

About plugin

  • Plugin page: wpsite-shortcode
  • Plugin version: 1.2
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.4-6.2.2
  • WordPress version: 6.3.1
  • First release: Mar 29, 2023
  • Latest release: Jun 26, 2023
  • Number of updates: 18
  • Update frequency: every 4.9 days
  • Top authors: wpfanyi (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /282 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 gracefully, with no errors

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

Analyzing server-side resources used by WPSite Shortcode
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0139.74 ▼3.91
Dashboard /wp-admin3.32 ▲0.0146.64 ▼2.19
Posts /wp-admin/edit.php3.37 ▲0.0150.14 ▼3.44
Add New Post /wp-admin/post-new.php5.92 ▲0.0382.73 ▼9.89
Media Library /wp-admin/upload.php3.24 ▲0.0136.96 ▼3.21
Site Shortcode /wp-admin/tools.php?page=wpsite-shortcode-settings3.3134.10

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 18 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
db_upgraded
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for WPSite Shortcode
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,797 ▲3614.72 ▲0.371.78 ▲0.0344.57 ▼9.43
Dashboard /wp-admin2,203 ▲235.63 ▲0.0295.80 ▲6.6641.45 ▲1.22
Posts /wp-admin/edit.php2,108 ▲81.97 ▼0.0440.04 ▼1.6536.19 ▼2.86
Add New Post /wp-admin/post-new.php1,533 ▲523.07 ▲0.08682.29 ▼4.8864.89 ▲9.06
Media Library /wp-admin/upload.php1,405 ▲24.18 ▼0.03102.27 ▼4.9247.16 ▲1.69
Site Shortcode /wp-admin/tools.php?page=wpsite-shortcode-settings1,2111.9923.9631.40

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

SRP Passed 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
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
4 plugin tags: seo, dynamic data, shortcode, metadata

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

"WPSite Shortcode" version 1.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
118 characters long description:
A collection of metadata shortcodes for easy use of WordPress sites,It can also usually be used as a wildcard for SEO.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin1,276 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
PHP1024683805
PO File2166170408
CSS1132963

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.11
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%
Functions55
▷ Named functions55100.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
No PNG images were found in this plugin