83% grid-shortcodes

Code Review | Grid Shortcodes

WordPress plugin Grid Shortcodes scored83%from 54 tests.

About plugin

  • Plugin page: grid-shortcodes
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-6.3
  • WordPress version: 6.3.1
  • First release: Jun 11, 2015
  • Latest release: Aug 28, 2023
  • Number of updates: 30
  • Update frequency: every 100.0 days
  • Top authors: spwebguy (100%)

Code review

54 tests

User reviews

10 reviews

Install metrics

2,000+ active /17,902 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 gracefully, with no errors

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

An overview of server-side resources used by Grid Shortcodes
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0037.47 ▼2.50
Dashboard /wp-admin3.31 ▲0.0146.07 ▼6.70
Posts /wp-admin/edit.php3.36 ▲0.0146.21 ▼0.82
Add New Post /wp-admin/post-new.php5.89 ▲0.0182.53 ▼2.89
Media Library /wp-admin/upload.php3.23 ▲0.0132.31 ▼3.12

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: 5 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Grid Shortcodes
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,805 ▲5913.24 ▼1.061.73 ▼0.1543.72 ▼2.42
Dashboard /wp-admin2,212 ▲274.84 ▼0.04100.54 ▼14.7540.41 ▼5.60
Posts /wp-admin/edit.php2,092 ▲32.01 ▼0.0239.92 ▲1.6634.38 ▲0.48
Add New Post /wp-admin/post-new.php1,532 ▼118.41 ▼4.61631.28 ▼50.3458.07 ▲3.62
Media Library /wp-admin/upload.php1,394 ▲64.18 ▼0.0196.92 ▼10.3441.13 ▼5.57

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded

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 | 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
Almost there! Just fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/grid-shortcodes/gsc.php:27

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Please fix the following attributes:
  • Tags: There are too many tags (11 tag instead of maximum 10)
You can look at the official readme.txt

grid-shortcodes/gsc.php 85% from 13 tests

The entry point to "Grid Shortcodes" version 1.1 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Description: The description should be shorter than 140 characters (currently 297 characters long)
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("grid-shortcodes.php" instead of "gsc.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin154 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP1231668
JavaScript10065
CSS15521

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.13
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%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
img/gsc-mce-icon.png2.87KB0.24KB▼ 91.81%