77% gs-coach

Code Review | GS Coaches

WordPress plugin GS Coaches scored 77% from 54 tests.

About plugin

  • Plugin page: gs-coach
  • Plugin version: 1.1.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3-6.3
  • WordPress version: 6.3.1
  • First release: Mar 4, 2017
  • Latest release: Aug 30, 2023
  • Number of updates: 46
  • Update frequency: every 51.5 days
  • Top authors: samdani (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

30+ active / 3,251 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

Server metrics [RAM: ▲0.18MB] [CPU: ▲1.39ms] 75% from 4 tests

This is a short check of server-side resources used by GS Coaches
The following require your attention
  • CPU: Total CPU usage should be kept under 500.00ms (currently 683.73ms on /wp-admin/edit.php?post_type=gs_coaches&page=gs-coach-plugins-lite)
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0741.58 ▲0.33
Dashboard /wp-admin3.58 ▲0.2754.19 ▲5.67
Posts /wp-admin/edit.php3.63 ▲0.2753.75 ▲8.66
Add New Post /wp-admin/post-new.php6.09 ▲0.2187.80 ▼7.21
Media Library /wp-admin/upload.php3.41 ▲0.1841.37 ▲6.77
All Coaches /wp-admin/edit.php?post_type=gs_coaches3.4745.99
Add New Coach /wp-admin/post-new.php?post_type=gs_coaches3.5260.29
GS Plugins Pro /wp-admin/edit.php?post_type=gs_coaches&page=gs-coach-plugins-premium3.51659.97
Coaches Settings /wp-admin/edit.php?post_type=gs_coaches&page=coaches-settings3.4038.04
Help & Usage /wp-admin/edit.php?post_type=gs_coaches&page=gs-coach-plugins-help3.4137.30
GS Plugins Lite /wp-admin/edit.php?post_type=gs_coaches&page=gs-coach-plugins-lite3.74683.73

Server storage [IO: ▲1.43MB] [DB: ▲0.04MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 40 new files
Database: no new tables, 11 new options
New WordPress options
gs_coaches_style_settings
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
widget_recent-posts
gs_coaches_adv_settings
gs_coaches_option_01_settings
gs_coaches_option_02_settings
...

Browser metrics Passed 4 tests

An overview of browser requirements for GS Coaches
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,149 ▲41415.73 ▲1.495.34 ▲3.6344.15 ▲0.74
Dashboard /wp-admin2,440 ▲2496.76 ▲0.86133.06 ▲32.8843.40 ▲4.29
Posts /wp-admin/edit.php2,343 ▲2543.71 ▲1.7250.95 ▲10.3431.08 ▼4.88
Add New Post /wp-admin/post-new.php1,603 ▲6623.20 ▲5.07753.77 ▲152.4238.32 ▼23.34
Media Library /wp-admin/upload.php1,479 ▲914.61 ▲0.30108.39 ▲9.4946.02 ▲0.51
All Coaches /wp-admin/edit.php?post_type=gs_coaches1,3103.6855.2032.27
Add New Coach /wp-admin/post-new.php?post_type=gs_coaches2,5517.99208.0575.89
GS Plugins Pro /wp-admin/edit.php?post_type=gs_coaches&page=gs-coach-plugins-premium2,4153.4445.5289.37
Coaches Settings /wp-admin/edit.php?post_type=gs_coaches&page=coaches-settings2,6156.18135.7353.55
Help & Usage /wp-admin/edit.php?post_type=gs_coaches&page=gs-coach-plugins-help1,1513.3043.4538.31
GS Plugins Lite /wp-admin/edit.php?post_type=gs_coaches&page=gs-coach-plugins-lite2,7563.5448.9591.71

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 11 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • gs_coaches_option_02_settings
    • gs_coaches_option_03_settings
    • gs_coaches_style_settings
    • gs_coaches_adv_settings
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • ...

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following items
  • 15× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/gs-coach/gs-coaches-files/includes/gs_coaches_column.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/gs-coach/gs-coaches-files/includes/gs_coaches_root.php:19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/gs-coach/gs-coaches-files/includes/gs_coaches_cpt.php:52
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/gs-coach/gs-coaches-files/includes/gs_coaches_meta_fields.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_the_id() in wp-content/plugins/gs-coach/gs-coaches-files/includes/templates/gs_coaches_structure_grid_1_square_overlay.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/gs-coach/gs-coaches-files/gs-plugins/gs-plugins-free.php:15
    • > PHP Notice
      Undefined variable: output in wp-content/plugins/gs-coach/gs-coaches-files/includes/templates/gs_coaches_structure_grid_1_square_overlay.php on line 7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/gs-coach/gs-coaches-files/gs-common-pages/gs-coach-common-pages.php:3
    • > PHP Notice
      Undefined variable: output in wp-content/plugins/gs-coach/gs-coaches-files/includes/templates/gs_coaches_structure_grid_2_square_halfoverlay.php on line 8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/gs-coach/gs-coaches-files/includes/gs_coaches_shortcode.php:16

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Please fix the following user-side errors
    • > GET request to /wp-admin/edit.php?post_type=gs_coaches&page=coaches-settings
    • > Security (warning) in unknown
    security - Error with Permissions-Policy header: Unrecognized feature: 'ambient-light-sensor'.
    • > GET request to /wp-admin/edit.php?post_type=gs_coaches&page=coaches-settings
    • > Security (warning) in unknown
    security - Error with Permissions-Policy header: Unrecognized feature: 'bluetooth'.

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Please fix the following attributes:
  • Tags: You are using too many tags: 16 tag instead of maximum 10
The official readme.txt might help

gs-coach/gs_coaches.php 77% from 13 tests

The principal PHP file in "GS Coaches" v. 1.1.0 is loaded by WordPress automatically on each request
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("gs-coach.php" instead of "gs_coaches.php")
  • Description: Please keep the plugin description shorter than 140 characters (currently 688 characters long)
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin7,499 lines of code in 32 files:
LanguageFilesBlank linesComment linesLines of code
PHP197919623,664
CSS7169302,517
SVG200566
Sass11016521
JavaScript26272210
JSON10021

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity30.11
▷ Minimum class complexity3.00
▷ Maximum class complexity70.00
Average method complexity2.64
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes00.00%
Methods149
▷ Static methods32.01%
▷ Public methods11577.18%
▷ Protected methods64.03%
▷ Private methods2818.79%
Functions32
▷ Named functions3093.75%
▷ Anonymous functions26.25%
Constants7
▷ Global constants7100.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
2 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
gs-coaches-files/assets/img/icon-128x128.png7.01KB3.31KB▼ 52.83%
gs-coaches-files/assets/img/no_img.png8.45KB3.71KB▼ 56.07%