62% wpbmb-entrez

Code Review | WPBMB Entrez

WordPress plugin WPBMB Entrez scored 62% from 54 tests.

About plugin

  • Plugin page: wpbmb-entrez
  • Plugin version: 1.1.0
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Oct 9, 2017
  • Latest release: Jun 2, 2019
  • Number of updates: 15
  • Update frequency: every 42.5 days
  • Top authors: sdg0919 (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

80+ active / 1,184 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼1.96MB] [CPU: ▼49.99ms] Passed 4 tests

A check of server-side resources used by WPBMB Entrez
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.03 ▼1.446.03 ▼38.45
Dashboard /wp-admin2.05 ▼1.268.09 ▼40.76
Posts /wp-admin/edit.php2.05 ▼1.319.46 ▼38.84
Add New Post /wp-admin/post-new.php2.05 ▼3.848.49 ▼81.89
Media Library /wp-admin/upload.php2.05 ▼1.187.10 ▼29.30
Developer /wp-admin/admin.php?page=wbe_developer2.057.39
Display Settings /wp-admin/admin.php?page=wbe_display2.056.95
Builder /wp-admin/admin.php?page=wbe_builder2.057.46
Shortcodes /wp-admin/admin.php?page=wbe_shortcodes2.058.48
General Options /wp-admin/admin.php?page=wbe_options2.057.93

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 474 new files
Database: 3 new tables, 7 new options
New tables
wp_wbe_meta
wp_wbe_cache
wp_wbe_shortcodes
New WordPress options
db_upgraded
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
wbe_version
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for WPBMB Entrez
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,949 ▲20313.95 ▼0.438.34 ▲6.7641.64 ▼0.42
Dashboard /wp-admin2,242 ▲545.84 ▲0.9599.48 ▼5.9539.32 ▼1.24
Posts /wp-admin/edit.php2,125 ▲362.02 ▼0.0034.85 ▲1.5834.72 ▼1.20
Add New Post /wp-admin/post-new.php1,564 ▲4523.41 ▲0.17573.52 ▼104.2349.68 ▼2.65
Media Library /wp-admin/upload.php1,427 ▲424.18 ▼0.0595.81 ▼5.2043.16 ▼0.57
Developer /wp-admin/admin.php?page=wbe_developer1,0572.1625.1640.90
Display Settings /wp-admin/admin.php?page=wbe_display2,3392.8989.4833.52
Builder /wp-admin/admin.php?page=wbe_builder1,0882.2824.6727.36
Shortcodes /wp-admin/admin.php?page=wbe_shortcodes1,1202.1625.0033.48
General Options /wp-admin/admin.php?page=wbe_options1,1272.2826.0128.73

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • This plugin did not uninstall without warnings or errors
    • > Warning in wp-content/plugins/wpbmb-entrez/includes/wbe-helpers.php+248
    array_merge(): Expected parameter 2 to be an array, bool given
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • 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
These errors were triggered by the plugin
  • 21 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wbe_options
    • > Warning in wp-content/plugins/wpbmb-entrez/includes/wbe-helpers.php+248
    array_merge(): Expected parameter 2 to be an array, bool given
  • 24 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wbe_options
    • > Notice in wp-content/plugins/wpbmb-entrez/includes/wbe-db.php+468
    Trying to access array offset on value of type null

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
Almost there! Just fix the following items
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/wpbmb-entrez/includes/cmb2/apigen/hook-docs.php
  • 56× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Picker_Base' not found in wp-content/plugins/wpbmb-entrez/includes/cmb2/includes/types/CMB2_Type_Text_Date.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'WP_UnitTestCase' not found in wp-content/plugins/wpbmb-entrez/includes/cmb2/tests/cmb-tests-base.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_REST_Controller_Boxes' not found in wp-content/plugins/wpbmb-entrez/includes/cmb2/includes/rest-api/CMB2_REST_Controller_Fields.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'WP_UnitTestCase' not found in wp-content/plugins/wpbmb-entrez/includes/cmb2/tests/cmb-tests-base.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_REST_Controller' not found in wp-content/plugins/wpbmb-entrez/includes/cmb2/includes/rest-api/CMB2_REST_Controller_Boxes.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Text_Date' not found in wp-content/plugins/wpbmb-entrez/includes/cmb2/includes/types/CMB2_Type_Text_Time.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'WP_UnitTestCase' not found in wp-content/plugins/wpbmb-entrez/includes/cmb2/tests/cmb-tests-base.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Base' not found in wp-content/plugins/wpbmb-entrez/includes/cmb2/includes/types/CMB2_Type_Textarea.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'WP_UnitTestCase' not found in wp-content/plugins/wpbmb-entrez/includes/cmb2/tests/cmb-tests-base.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'WP_UnitTestCase' not found in wp-content/plugins/wpbmb-entrez/includes/cmb2/tests/cmb-tests-base.php:10

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 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that need to be fixed:
  • Screenshots: These screenshots require images: #1 (General Settings), #2 (Display Settings), #3 (Shortcode Builder), #4 (Active Shortcodes Table and Reference), #5 (Developer Reference), #6 (Lightbox Template), #7 (Lightbox Template Abstract), #8 (Keyword Highlight Template (background highlight)), #9 (Keyword Highlight Template (bold)), #10 (RCSB Structure Template)
You can take inspiration from this readme.txt

wpbmb-entrez/wpbmb-entrez.php 92% from 13 tests

The primary PHP file in "WPBMB Entrez" version 1.1.0 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

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
Everything looks great! No dangerous files found in this plugin64,837 lines of code in 280 files:
LanguageFilesBlank linesComment linesLines of code
PO File12014,31518,50232,323
PHP943,8987,58113,830
CSS171,3431,1985,407
XML2004,498
JSON5003,644
JavaScript145017012,717
Sass16300251,379
Markdown62640796
Bourne Shell46745209
diff216834

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity17.02
▷ Minimum class complexity1.00
▷ Maximum class complexity183.00
Average method complexity2.64
▷ Minimum method complexity1.00
▷ Maximum method complexity31.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes91
▷ Abstract classes1112.09%
▷ Concrete classes8087.91%
▷ Final classes00.00%
Methods892
▷ Static methods12614.13%
▷ Public methods73982.85%
▷ Protected methods14015.70%
▷ Private methods131.46%
Functions98
▷ Named functions9697.96%
▷ Anonymous functions22.04%
Constants22
▷ Global constants1672.73%
▷ Class constants627.27%
▷ Public constants6100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
35 PNG files occupy 6.21MB with 1.98MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/cmb2/images/ui-bg_glass_55_fbf9ee_1x400.png0.12KB0.14KB0.00%
includes/cmb2/images/ui-icons_888888_256x240.png5.23KB4.11KB▼ 21.49%
assets/screenshot-1.png403.23KB122.40KB▼ 69.65%
includes/cmb2/images/ico-delete.png0.70KB0.72KB0.00%
assets/icon-512x512.png38.78KB12.35KB▼ 68.16%