90% gp-shortcuts

Code Review | Shortcuts for GeneratePress

WordPress plugin Shortcuts for GeneratePress scored90%from 54 tests.

About plugin

  • Plugin page: gp-shortcuts
  • Plugin version: 1.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0.0-6.1.1
  • WordPress version: 6.3.1
  • First release: Dec 30, 2022
  • Latest release: Jan 7, 2023
  • Number of updates: 10
  • Update frequency: every 0.9 days
  • Top authors: alvindcaesar (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /797 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

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

Server-side resources used by Shortcuts for GeneratePress
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0041.95 ▲0.27
Dashboard /wp-admin3.31 ▲0.0050.55 ▼1.74
Posts /wp-admin/edit.php3.36 ▲0.0048.98 ▼0.27
Add New Post /wp-admin/post-new.php5.89 ▲0.0083.96 ▼16.91
Media Library /wp-admin/upload.php3.23 ▲0.0046.08 ▲11.34

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 10 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by Shortcuts for GeneratePress
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲5314.23 ▼0.052.32 ▲0.5746.37 ▲1.62
Dashboard /wp-admin2,198 ▲215.57 ▼0.0592.62 ▲2.8738.27 ▼9.41
Posts /wp-admin/edit.php2,100 ▼32.02 ▲0.0041.40 ▼2.3235.53 ▲1.67
Add New Post /wp-admin/post-new.php1,526 ▼223.49 ▲0.31622.82 ▼39.9652.21 ▼5.93
Media Library /wp-admin/upload.php1,400 ▼34.17 ▼0.0694.38 ▼12.1840.50 ▼7.79

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Good news, no errors were detected

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
2 plugin tags: generateblocks, generatepress

gp-shortcuts/gp-shortcuts.php 92% from 13 tests

The main file in "Shortcuts for GeneratePress" v. 1.0.3 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please make the necessary changes and fix the following:
  • Domain Path: The domain path points to a folder that does not exist ("/languages")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected354 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP74720354

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity2.40
▷ Minimum class complexity1.00
▷ Maximum class complexity7.00
Average method complexity1.23
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods31
▷ Static methods2993.55%
▷ Public methods31100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
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
assets/images/gp-logo.png1.21KB0.79KB▼ 34.68%