62% genesis-staff-bio-grid

Code Review | Genesis Staff Bio Grid

WordPress plugin Genesis Staff Bio Grid scored62%from 54 tests.

About plugin

  • Plugin page: genesis-staff-bio...
  • Plugin version: 1.0.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-3.9.1
  • WordPress version: 6.3.1
  • First release: Apr 7, 2014
  • Latest release: Aug 4, 2014
  • Number of updates: 18
  • Update frequency: every 6.6 days
  • Top authors: jonschr (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

30+ active /3,666 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▼0.85MB] [CPU: ▼44.96ms] Passed 4 tests

An overview of server-side resources used by Genesis Staff Bio Grid
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.12 ▼0.3517.53 ▼22.84
Dashboard /wp-admin3.17 ▼0.1419.39 ▼29.04
Posts /wp-admin/edit.php3.17 ▼0.1920.03 ▼46.05
Add New Post /wp-admin/post-new.php3.17 ▼2.7222.38 ▼81.91
Media Library /wp-admin/upload.php3.17 ▼0.0622.21 ▼14.43
Staff Positions /wp-admin/edit-tags.php?taxonomy=staff-position&post_type=staff-member3.1720.42
All Staff Members /wp-admin/edit.php?post_type=staff-member3.1719.38
Add New /wp-admin/post-new.php?post_type=staff-member3.1716.70

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

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

Browser metrics Passed 4 tests

Genesis Staff Bio Grid: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,960 ▲19914.82 ▲0.271.72 ▼0.0644.28 ▲0.80
Dashboard /wp-admin2,363 ▲1866.20 ▲0.59112.73 ▲20.1244.56 ▲1.39
Posts /wp-admin/edit.php2,294 ▲1943.27 ▲1.2948.14 ▲11.8531.91 ▼8.04
Add New Post /wp-admin/post-new.php1,581 ▲5523.74 ▲0.70659.88 ▼24.5934.82 ▼31.99
Media Library /wp-admin/upload.php1,425 ▲284.15 ▼0.0379.43 ▼33.0342.16 ▼5.65
Staff Positions /wp-admin/edit-tags.php?taxonomy=staff-position&post_type=staff-member1,4683.2539.0429.10
All Staff Members /wp-admin/edit.php?post_type=staff-member1,2753.2346.2828.98
Add New /wp-admin/post-new.php?post_type=staff-member2,4428.13205.4678.86

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • Uninstall procedure had uncaught errors
    • > Warning in wp-content/plugins/genesis-staff-bio-grid/lib/metabox/init.php+746
    count(): Parameter must be an array or an object that implements Countable
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
These errors were triggered by the plugin
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=staff-member
    • > Warning in wp-content/plugins/genesis-staff-bio-grid/lib/metabox/init.php+746
    count(): Parameter must be an array or an object that implements Countable

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/genesis-staff-bio-grid/lib/metabox/tests/phpunit/includes/bootstrap.php
  • 10× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/genesis-staff-bio-grid/lib/templates/archive-staff-member.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function remove_action() in wp-content/plugins/genesis-staff-bio-grid/lib/templates/single-staff-member.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/genesis-staff-bio-grid/lib/register_staff_member_post_type.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/genesis-staff-bio-grid/lib/register_staff_position_taxonomy.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/genesis-staff-bio-grid/lib/shortcode.php:169
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/genesis-staff-bio-grid/staff-bio-grid.php:36
    • > PHP Fatal error
      Uncaught Error: Class 'WP_UnitTestCase' not found in wp-content/plugins/genesis-staff-bio-grid/lib/metabox/tests/phpunit/tests/CMB_Core_Test.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/genesis-staff-bio-grid/lib/metabox/init.php:41
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/genesis-staff-bio-grid/lib/template_picker.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/genesis-staff-bio-grid/lib/metabox/example-functions.php:11

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

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
7 plugin tags: staff, bio, thickbox, officers, genesis...

genesis-staff-bio-grid/staff-bio-grid.php 92% from 13 tests

Analyzing the main PHP file in "Genesis Staff Bio Grid" version 1.0.4
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("genesis-staff-bio-grid.php" instead of "staff-bio-grid.php")

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 plugin5,942 lines of code in 31 files:
LanguageFilesBlank linesComment linesLines of code
PHP166371,1692,389
JavaScript53124032,246
CSS411837912
Markdown3880288
Bourne Shell115459
JSON10031
XML10117

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.48
Average class complexity57.14
▷ Minimum class complexity1.00
▷ Maximum class complexity136.00
Average method complexity3.93
▷ Minimum method complexity1.00
▷ Maximum method complexity35.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods134
▷ Static methods3425.37%
▷ Public methods13298.51%
▷ Protected methods21.49%
▷ Private methods00.00%
Functions33
▷ Named functions33100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants583.33%
▷ Class constants116.67%
▷ Public constants1100.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/metabox/images/ui-bg_highlight-soft_75_cccccc_1x100.png0.10KB0.17KB0.00%
lib/metabox/images/ui-bg_glass_75_dadada_1x400.png0.11KB0.16KB0.00%
lib/metabox/images/ui-bg_glass_55_fbf9ee_1x400.png0.12KB0.14KB0.00%
lib/metabox/images/ui-bg_glass_95_fef1ec_1x400.png0.12KB0.14KB0.00%
lib/metabox/images/ui-icons_2e83ff_256x240.png4.27KB4.11KB▼ 3.78%