72% team-members-blocks

Code Review | Team Members Blocks

WordPress plugin Team Members Blocks scored 72% from 54 tests.

About plugin

  • Plugin page: team-members-blocks
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4.0-5.2
  • WordPress version: 5.9.2
  • First release: Jul 1, 2019
  • Latest release: Jul 3, 2019
  • Number of updates: 3
  • Update frequency: every 1.7 days
  • Top authors: zutigrm (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 812 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
This plugin's installer ran successfully

Server metrics [RAM: ▼2.39MB] [CPU: ▼348.10ms] Passed 4 tests

Analyzing server-side resources used by Team Members Blocks
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.69 ▲0.1759.85 ▲5.70
Dashboard /wp-admin1.93 ▼1.474.12 ▼32.03
Posts /wp-admin/edit.php1.93 ▼1.704.31 ▼51.42
Add New Post /wp-admin/post-new.php1.93 ▼5.033.78 ▼1,276.37
Media Library /wp-admin/upload.php1.93 ▼1.373.39 ▼32.57
About /wp-admin/edit.php?post_type=tf_members&page=tf-dashboard1.944.23
Add Members /wp-admin/post-new.php?post_type=tf_members1.944.69
Addons /wp-admin/edit.php?post_type=tf_members&page=tf-addons1.943.14
All Members /wp-admin/edit.php?post_type=tf_members1.945.92
License /wp-admin/edit.php?post_type=tf_members&page=tf-license1.944.28

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 376 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Team Members Blocks
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,836 ▲8216.01 ▲0.096.43 ▲0.302.43 ▼0.28
Dashboard /wp-admin2,954 ▲936.14 ▼0.14118.66 ▼11.57163.17 ▲6.32
Posts /wp-admin/edit.php2,754 ▲973.26 ▲0.0263.69 ▼0.65136.91 ▼3.29
Add New Post /wp-admin/post-new.php1,716 ▲4818.98 ▲0.89390.69 ▼19.50154.17 ▼5.13
Media Library /wp-admin/upload.php1,766 ▲655.55 ▲0.05149.22 ▲8.95173.74 ▼16.98
About /wp-admin/edit.php?post_type=tf_members&page=tf-dashboard1,1382.4755.61159.45
Add Members /wp-admin/post-new.php?post_type=tf_members4,3176.57150.34250.54
Addons /wp-admin/edit.php?post_type=tf_members&page=tf-addons1,0872.5055.85162.47
All Members /wp-admin/edit.php?post_type=tf_members1,4083.2366.82253.07
License /wp-admin/edit.php?post_type=tf_members&page=tf-license1,0742.7655.72101.70

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • The plugin did not uninstall gracefully
    • > User notice in wp-includes/functions.php+5768
    wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the wp-a11y handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)

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
Almost there, just fix the following server-side errors
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=tf_members&page=tf-license
    • > User notice in wp-includes/functions.php+5768
    wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the wp-a11y handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
    • > GET request to /wp-admin/edit.php?post_type=tf_members
    • > POST request to /wp-admin/admin-ajax.php
    • > Error in wp-admin/admin.php+99
    Uncaught Error: Call to undefined function auth_redirect() in wp-admin/admin.php:99
    Stack trace:
    #0 wp-admin/update.php(16): require_once()
    #1 wp-content/plugins/team-members-blocks/core/init.php(32): require_once('/var/www/wordpr...')
    #2 wp-content/plugins/team-members-blocks/core/init.php(7): TFTeamBlocks\Core\Init->includes()
    #3 wp-content/plugins/team-members-blocks/team-blocks.php(22): TFTeamBlocks\Core\Init->__construct()
    #4 wp-settings.php(418): include_once('/var/www/wordpr...')
    #5 wp-config.php(129): require_once('/var/www/wordpr...')
    #6 wp-load.php(50): require_once('/var/www/wordpr...')
    #7 wp-admin/admin-ajax.php(22): require_once('/var/www/wordpr...')
    #8 {main}
    thrown

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
Almost there! Just fix the following items
  • 45× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Taxonomy_Base' not found in wp-content/plugins/team-members-blocks/cmb2/includes/types/CMB2_Type_Taxonomy_Select.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Base' not found in wp-content/plugins/team-members-blocks/cmb2/includes/types/CMB2_Type_Multi_Base.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/team-members-blocks/cmb2/example-functions.php:105
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Taxonomy_Base' not found in wp-content/plugins/team-members-blocks/cmb2/includes/types/CMB2_Type_Taxonomy_Multicheck.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Base' not found in wp-content/plugins/team-members-blocks/cmb2/includes/types/CMB2_Type_Text_Datetime_Timestamp_Timezone.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Picker_Base' not found in wp-content/plugins/team-members-blocks/cmb2/includes/types/CMB2_Type_Text_Date.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/team-members-blocks/cmb2/init.php:126
    • > PHP Fatal error
      Uncaught Error: Class 'TMBOptions\\OptionsFactory' not found in wp-content/plugins/team-members-blocks/options/members.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Text' not found in wp-content/plugins/team-members-blocks/cmb2/includes/types/CMB2_Type_Checkbox.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Text' not found in wp-content/plugins/team-members-blocks/cmb2/includes/types/CMB2_Type_Colorpicker.php:13

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Please fix the following user-side errors
    • > GET request to /wp-admin/edit.php?post_type=tf_members
    • > Network (severe)
    wp-admin/admin-ajax.php - Failed to load resource: the server responded with a status of 500 (Internal Server Error)

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
6 plugin tags: team cards, team, team skills, team member, team members blocks...

team-members-blocks/team-blocks.php 85% from 13 tests

"Team Members Blocks" version 1.0.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("team-members-blocks.php" instead of "team-blocks.php")
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
There were no executable files found in this plugin48,856 lines of code in 225 files:
LanguageFilesBlank linesComment linesLines of code
PO File12014,31518,50232,323
PHP702,3476,2498,095
CSS141,2251,1495,039
JavaScript73305041,405
Sass11168231,116
Markdown22140632
HTML1351246

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity17.16
▷ Minimum class complexity1.00
▷ Maximum class complexity183.00
Average method complexity3.14
▷ Minimum method complexity1.00
▷ Maximum method complexity28.00
Code structure
Namespaces4
Interfaces2
Traits0
Classes77
▷ Abstract classes810.39%
▷ Concrete classes6989.61%
▷ Final classes00.00%
Methods605
▷ Static methods11318.68%
▷ Public methods49581.82%
▷ Protected methods8814.55%
▷ Private methods223.64%
Functions34
▷ Named functions34100.00%
▷ Anonymous functions00.00%
Constants15
▷ Global constants960.00%
▷ Class constants640.00%
▷ Public constants6100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
18 PNG files occupy 0.13MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
cmb2/images/ui-icons_222222_256x240.png4.27KB4.11KB▼ 3.78%
assets/images/instagram.png75.99KB16.73KB▼ 77.99%
cmb2/images/ui-bg_glass_95_fef1ec_1x400.png0.12KB0.14KB0.00%
cmb2/images/ui-icons_cd0a0a_256x240.png4.27KB4.11KB▼ 3.78%
assets/images/twitter.png16.13KB16.13KB0.02%