72% glofox-shortcodes

Code Review | Glofox Shortcodes

WordPress plugin Glofox Shortcodes scored72%from 54 tests.

About plugin

  • Plugin page: glofox-shortcodes
  • Plugin version: 2.6
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.0
  • WordPress version: 6.3.1
  • First release: Jun 12, 2020
  • Latest release: Dec 13, 2022
  • Number of updates: 23
  • Update frequency: every 39.7 days
  • Top authors: glofoxwebdev (100%)

Code review

54 tests

User reviews

1 review

Install metrics

300+ active /1,059 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.03MB] [CPU: ▼4.10ms] Passed 4 tests

This is a short check of server-side resources used by Glofox Shortcodes
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0339.25 ▼0.02
Dashboard /wp-admin3.33 ▲0.0348.28 ▲0.17
Posts /wp-admin/edit.php3.38 ▲0.0347.85 ▼2.24
Add New Post /wp-admin/post-new.php5.93 ▲0.0479.81 ▼14.19
Media Library /wp-admin/upload.php3.25 ▲0.0234.17 ▲0.06
Glofox /wp-admin/options-general.php?page=glofox3.2029.93

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Glofox Shortcodes
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,801 ▲4014.21 ▼0.412.04 ▲0.3844.93 ▲2.73
Dashboard /wp-admin2,203 ▲235.55 ▼0.0596.07 ▲8.8753.72 ▲9.53
Posts /wp-admin/edit.php2,111 ▲111.99 ▲0.0134.20 ▼0.7030.70 ▼8.40
Add New Post /wp-admin/post-new.php1,533 ▲523.73 ▲0.73685.39 ▲33.0454.73 ▲3.72
Media Library /wp-admin/upload.php1,408 ▲54.24 ▼0.0395.73 ▼8.9944.93 ▼1.04
Glofox /wp-admin/options-general.php?page=glofox1,1732.0623.6342.15

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
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Please fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=glofox
    • > Notice in wp-content/plugins/glofox-shortcodes/glofox_shortcodes.php+152
    Undefined index: _wpnonce
    • > GET request to /wp-admin/options-general.php?page=glofox
    • > Notice in wp-content/plugins/glofox-shortcodes/inc/options-page-wrapper.php+46
    Undefined variable: branchId

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 2× PHP files output text when accessed directly:
    • > /wp-content/plugins/glofox-shortcodes/inc/lead_capture.php
    • > /wp-content/plugins/glofox-shortcodes/inc/feature.php
  • 24× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Notice
      Undefined variable: title in wp-content/plugins/glofox-shortcodes/inc/lead_capture.php on line 5
    • > PHP Notice
      Undefined variable: after_title in wp-content/plugins/glofox-shortcodes/inc/feature.php on line 5
    • > PHP Notice
      Undefined variable: after_widget in wp-content/plugins/glofox-shortcodes/inc/lead_capture.php on line 35
    • > PHP Notice
      Undefined variable: after_title in wp-content/plugins/glofox-shortcodes/inc/lead_capture.php on line 5
    • > PHP Notice
      Undefined variable: branch_id in wp-content/plugins/glofox-shortcodes/inc/lead_capture.php on line 12
    • > PHP Notice
      Undefined variable: random_id in wp-content/plugins/glofox-shortcodes/inc/lead_capture.php on line 26
    • > PHP Notice
      Undefined variable: after_widget in wp-content/plugins/glofox-shortcodes/inc/feature.php on line 29
    • > PHP Notice
      Undefined variable: query_string in wp-content/plugins/glofox-shortcodes/inc/feature.php on line 7
    • > PHP Notice
      Undefined variable: before_widget in wp-content/plugins/glofox-shortcodes/inc/feature.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/glofox-shortcodes/inc/options-page-wrapper.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
2 plugin tags: shortcode, glofox

glofox-shortcodes/glofox_shortcodes.php 92% from 13 tests

"Glofox Shortcodes" version 2.6's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("glofox-shortcodes.php" instead of "glofox_shortcodes.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin544 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP417016478
CSS26045
JavaScript26921

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.37
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

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
8 PNG files occupy 0.30MB with 0.20MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/classic_1.png3.62KB1.13KB▼ 68.79%
images/find_your_branch_id.png136.30KB36.74KB▼ 73.04%
images/shortcode_example.png9.52KB3.06KB▼ 67.91%
images/glofox_logo_dark.png10.22KB4.68KB▼ 54.19%
images/customise_colors.png89.75KB26.43KB▼ 70.56%