84% gleam-shortcodes

Code Review | Gleam Shortcodes

WordPress plugin Gleam Shortcodes scored84%from 54 tests.

About plugin

  • Plugin page: gleam-shortcodes
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-4.8
  • WordPress version: 6.3.1
  • First release: Aug 5, 2017
  • Latest release: Aug 5, 2017
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: jpcrajput (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /3,319 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
Install script ran successfully

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

Server-side resources used by Gleam Shortcodes
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0035.51 ▼6.81
Dashboard /wp-admin3.31 ▲0.0141.66 ▼4.27
Posts /wp-admin/edit.php3.36 ▲0.0049.75 ▲4.02
Add New Post /wp-admin/post-new.php5.89 ▲0.0078.34 ▼20.68
Media Library /wp-admin/upload.php3.23 ▲0.0033.37 ▼1.35

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

Browser metrics Passed 4 tests

A check of browser resources used by Gleam Shortcodes
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.17 ▼1.213.77 ▲1.9538.47 ▼1.81
Dashboard /wp-admin2,209 ▲244.84 ▼0.05114.80 ▲8.4441.54 ▼3.66
Posts /wp-admin/edit.php2,086 ▼32.03 ▲0.0240.45 ▲3.6734.49 ▲1.81
Add New Post /wp-admin/post-new.php1,542 ▲1518.31 ▼4.76631.27 ▲36.6360.16 ▼2.54
Media Library /wp-admin/upload.php1,388 ▼04.17 ▼0.06103.42 ▼3.6041.64 ▼1.90

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/gleam-shortcodes/core/shortcodes.php:12

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)
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
3 plugin tags: user information, user, user shortcodes

gleam-shortcodes/user-shortcodes.php 92% from 13 tests

The principal PHP file in "Gleam Shortcodes" v. 1.0 is loaded by WordPress automatically on each request
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 ("gleam-shortcodes.php" instead of "user-shortcodes.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin65 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP3632665

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.20
Average class complexity8.00
▷ Minimum class complexity8.00
▷ Maximum class complexity8.00
Average method complexity1.88
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG files were detected