84% ganohrs-toggle-shortcode

Code Review | Ganohrs Toggle Shortcode

WordPress plugin Ganohrs Toggle Shortcode scored84%from 54 tests.

About plugin

  • Plugin page: ganohrs-toggle-sh...
  • Plugin version: 0.2.4
  • PHP compatiblity: 5.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.4.1
  • WordPress version: 6.3.1
  • First release: Jun 7, 2018
  • Latest release: Nov 9, 2023
  • Number of updates: 34
  • Update frequency: every 58.3 days
  • Top authors: ganohr (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /2,017 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▼0.10MB] [CPU: ▼17.74ms] Passed 4 tests

This is a short check of server-side resources used by Ganohrs Toggle Shortcode
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.1237.66 ▼2.65
Dashboard /wp-admin3.19 ▼0.1126.64 ▼24.43
Posts /wp-admin/edit.php3.34 ▼0.0228.56 ▼17.63
Add New Post /wp-admin/post-new.php5.57 ▼0.3267.12 ▼23.74
Media Library /wp-admin/upload.php3.27 ▲0.0527.54 ▼5.17
Ganohrs Toggle Shortcode /wp-admin/options-general.php?page=ganohrs-toggle-shortcode-options3.1725.51

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 47 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
can_compress_scripts
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for Ganohrs Toggle Shortcode
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,794 ▲3214.32 ▼0.031.66 ▼0.2837.11 ▼7.15
Dashboard /wp-admin2,202 ▲225.60 ▲0.0283.81 ▼7.2838.99 ▼3.64
Posts /wp-admin/edit.php2,104 ▲41.96 ▲0.0236.20 ▼3.6133.67 ▼1.78
Add New Post /wp-admin/post-new.php1,529 ▲323.50 ▲0.15645.91 ▼56.7056.12 ▲4.60
Media Library /wp-admin/upload.php1,401 ▲14.14 ▼0.0299.49 ▼10.9940.47 ▼4.88
Ganohrs Toggle Shortcode /wp-admin/options-general.php?page=ganohrs-toggle-shortcode-options1,5792.0226.20162.08

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
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
These errors were triggered by the plugin
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=ganohrs-toggle-shortcode-options
    • > Notice in wp-content/plugins/ganohrs-toggle-shortcode/ganohrs-toggle-shortcode.php+365
    Undefined index: amp
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=ganohrs-toggle-shortcode-options
    • > Notice in wp-content/plugins/ganohrs-toggle-shortcode/ganohrs-toggle-shortcode.php+367
    Undefined index: type
    • > GET request to /wp-admin/options-general.php?page=ganohrs-toggle-shortcode-options
    • > Notice in wp-content/plugins/ganohrs-toggle-shortcode/class-ganohrs-toggle-shortcode-options.php+83
    Trying to access array offset on value of type bool

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

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
3 plugin tags: css, amp, toggle

ganohrs-toggle-shortcode/ganohrs-toggle-shortcode.php 92% from 13 tests

"Ganohrs Toggle Shortcode" version 0.2.4's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Description: The description should be shorter than 140 characters (currently 468 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Good job! No executable or dangerous file extensions detected13,100 lines of code in 46 files:
LanguageFilesBlank linesComment linesLines of code
CSS4442521712,321
PHP271152779

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.67
Average class complexity90.00
▷ Minimum class complexity90.00
▷ Maximum class complexity90.00
Average method complexity7.85
▷ Minimum method complexity1.00
▷ Maximum method complexity47.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods13
▷ Static methods00.00%
▷ Public methods13100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions18
▷ Named functions1688.89%
▷ Anonymous functions211.11%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There were not PNG files found in your plugin