78% team-view

Code Review | Team View

WordPress plugin Team View scored 78% from 54 tests.

About plugin

  • Plugin page: team-view
  • Plugin version: 1.1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-5.8
  • WordPress version: 5.9.2
  • First release: Feb 28, 2017
  • Latest release: Aug 6, 2021
  • Number of updates: 7
  • Update frequency: every 231.1 days
  • Top authors: wenthemes (100%)

Code review

54 tests

User reviews

1 review

Install metrics

2,000+ active / 29,386 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.08MB] [CPU: ▼290.80ms] Passed 4 tests

An overview of server-side resources used by Team View
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.63 ▲0.1153.62 ▲0.38
Dashboard /wp-admin3.49 ▲0.0934.84 ▲2.50
Posts /wp-admin/edit.php3.72 ▲0.0842.10 ▲5.56
Add New Post /wp-admin/post-new.php7.01 ▲0.0494.39 ▼1,166.50
Media Library /wp-admin/upload.php3.44 ▲0.1425.72 ▲0.42
All Team Members /wp-admin/edit.php?post_type=tv_member3.4726.34
Add New /wp-admin/post-new.php?post_type=tv_member4.0443.81

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 137 new files
Database: no new tables, 1 new option
New WordPress options
widget_team-view-grid

Browser metrics Passed 4 tests

This is an overview of browser requirements for Team View
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,958 ▲21616.32 ▲0.699.32 ▲3.1817.12 ▲14.78
Dashboard /wp-admin2,940 ▲796.11 ▲0.02119.09 ▼19.61156.32 ▼5.62
Posts /wp-admin/edit.php2,736 ▲423.26 ▲0.0165.83 ▲2.81140.03 ▼4.24
Add New Post /wp-admin/post-new.php1,697 ▲516.34 ▼4.45414.89 ▼22.02158.56 ▲7.19
Media Library /wp-admin/upload.php1,746 ▲485.60 ▲0.05147.12 ▲8.75190.58 ▲4.31
All Team Members /wp-admin/edit.php?post_type=tv_member1,4093.1861.62112.36
Add New /wp-admin/post-new.php?post_type=tv_member2,4095.76112.78131.44

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
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 1 option
    • widget_team-view-grid

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

SRP 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please take a closer look at the following
  • 2× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/team-view/admin/partials/team-view-admin-display.php
    • > /wp-content/plugins/team-view/public/partials/team-view-public-display.php
  • 36× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Select' not found in wp-content/plugins/team-view/lib/cmb2/includes/types/CMB2_Type_Select_Timezone.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Text' not found in wp-content/plugins/team-view/lib/cmb2/includes/types/CMB2_Type_File_Base.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Textarea' not found in wp-content/plugins/team-view/lib/cmb2/includes/types/CMB2_Type_Textarea_Code.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Base' not found in wp-content/plugins/team-view/lib/cmb2/includes/CMB2.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Picker_Base' not found in wp-content/plugins/team-view/lib/cmb2/includes/types/CMB2_Type_Text_Datetime_Timestamp.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Hookup_Base' not found in wp-content/plugins/team-view/lib/cmb2/includes/CMB2_hookup.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Base' not found in wp-content/plugins/team-view/lib/cmb2/includes/types/CMB2_Type_Textarea.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Taxonomy_Base' not found in wp-content/plugins/team-view/lib/cmb2/includes/types/CMB2_Type_Taxonomy_Select.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Hookup_Base' not found in wp-content/plugins/team-view/lib/cmb2/includes/rest-api/CMB2_REST.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_REST_Controller_Boxes' not found in wp-content/plugins/team-view/lib/cmb2/includes/rest-api/CMB2_REST_Controller_Fields.php:17

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need your attention:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Adding team members), #2 (Display team members)
You can take inspiration from this readme.txt

team-view/team-view.php Passed 13 tests

The main PHP file in "Team View" ver. 1.1.2 adds more information about the plugin and also serves as the entry point for this plugin
87 characters long description:
Simple and easy, responsive and mobile friendly plugin to display team members profile.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin17,983 lines of code in 103 files:
LanguageFilesBlank linesComment linesLines of code
CSS181,0901,0557,123
PHP631,8435,0315,763
SVG1002,671
Sass13238251,151
JavaScript6230271847
Markdown21440428

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.48
Average class complexity15.01
▷ Minimum class complexity1.00
▷ Maximum class complexity141.00
Average method complexity3.17
▷ Minimum method complexity1.00
▷ Maximum method complexity26.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes71
▷ Abstract classes811.27%
▷ Concrete classes6388.73%
▷ Final classes00.00%
Methods461
▷ Static methods6914.97%
▷ Public methods38583.51%
▷ Protected methods6814.75%
▷ Private methods81.74%
Functions26
▷ Named functions26100.00%
▷ Anonymous functions00.00%
Constants14
▷ Global constants857.14%
▷ Class constants642.86%
▷ Public constants6100.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
14 compressed PNG files occupy 0.02MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
lib/cmb2/images/ui-icons_cd0a0a_256x240.png4.27KB4.11KB▼ 3.78%
lib/cmb2/images/ui-icons_454545_256x240.png4.27KB4.11KB▼ 3.78%
lib/cmb2/images/ui-bg_glass_55_fbf9ee_1x400.png0.12KB0.14KB0.00%
lib/cmb2/images/ui-bg_flat_0_aaaaaa_40x100.png0.18KB0.08KB▼ 51.67%
lib/cmb2/images/ui-bg_glass_95_fef1ec_1x400.png0.12KB0.14KB0.00%