83% bing-boards

Code Review | Bing Boards

WordPress plugin Bing Boards scored83%from 54 tests.

About plugin

  • Plugin page: bing-boards
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.1-3.8
  • WordPress version: 6.3.1
  • First release: Oct 15, 2013
  • Latest release: Jan 21, 2014
  • Number of updates: 21
  • Update frequency: every 8.0 days
  • Top authors: ModernTribe (95.24%)peterchester (9.52%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,849 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.37MB] [CPU: ▼1.07ms] Passed 4 tests

Analyzing server-side resources used by Bing Boards
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.69 ▲0.2239.26 ▼0.88
Dashboard /wp-admin3.77 ▲0.4655.50 ▲6.48
Posts /wp-admin/edit.php3.82 ▲0.4648.29 ▼1.77
Add New Post /wp-admin/post-new.php6.30 ▲0.4190.10 ▼6.40
Media Library /wp-admin/upload.php3.63 ▲0.3940.79 ▲4.79
About /wp-admin/edit.php?post_type=bing_board&page=bing-about3.6135.45
All Bing Boards /wp-admin/edit.php?post_type=bing_board3.7538.57
Add New /wp-admin/post-new.php?post_type=bing_board3.8353.15

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 53 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
bing_activation_notice_global_skip
widget_theysaidso_widget
widget_recent-comments
db_upgraded
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Bing Boards
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,877 ▲12013.56 ▼0.834.94 ▲3.0444.24 ▼5.48
Dashboard /wp-admin2,237 ▲525.87 ▼0.01111.77 ▲11.3443.28 ▲4.92
Posts /wp-admin/edit.php2,117 ▲252.03 ▲0.0539.40 ▼2.4632.64 ▼2.48
Add New Post /wp-admin/post-new.php6,484 ▲4,94220.12 ▲2.04946.31 ▲273.6356.08 ▲1.39
Media Library /wp-admin/upload.php1,419 ▲284.19 ▲0.0396.20 ▼30.5941.63 ▼17.17
About /wp-admin/edit.php?post_type=bing_board&page=bing-about8912.0224.3326.88
All Bing Boards /wp-admin/edit.php?post_type=bing_board1,0791.9630.0734.48
Add New /wp-admin/post-new.php?post_type=bing_board1,8494.5095.4948.21

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
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_recent-posts
    • db_upgraded
    • bing_activation_notice_global_skip
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 16× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Notice
      Undefined variable: can_publish in wp-content/plugins/bing-boards/views/search-terms-metabox.template.php on line 2
    • > PHP Warning
      implode(): Invalid arguments passed in wp-content/plugins/bing-boards/views/search-terms-metabox.template.php on line 15
    • > PHP Notice
      Undefined variable: action_url in wp-content/plugins/bing-boards/views/scrap-metabox.template.php on line 1
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/bing-boards/views/panels-metabox-single-panel.template.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/bing-boards/views/search-terms-metabox.template.php:19
    • > PHP Notice
      Undefined variable: panels in wp-content/plugins/bing-boards/views/panels-metabox.template.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/bing-boards/views/live-editor.template.php:8
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/bing-boards/views/panels-metabox.template.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function submit_button() in wp-content/plugins/bing-boards/views/publish-metabox.template.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/bing-boards/views/about-page.template.php:26

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need your attention:
  • Screenshots: Add images for these screenshots: #1 (An example of a Bing Board on Bing.com), #2 (Building a Bing Board in WordPress), #3 (Panel Editor), #4 (The Panel editor features inline editing!), #5 (Build a panel based on a post.), #6 (Or build a board directly from within a post!)
  • Tags: Too many tags (13 tag instead of maximum 10); only the first 5 tags are used in your directory listing
The official readme.txt is a good inspiration

bing-boards/bing-boards.php Passed 13 tests

The primary PHP file in "Bing Boards" version 1.0.2 is used by WordPress to initiate all plugin functionality
64 characters long description:
Create and submit Bing Boards directly from your WordPress site.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin4,177 lines of code in 35 files:
LanguageFilesBlank linesComment linesLines of code
PHP258621,1292,084
Sass24101,073
JavaScript52882871,004
Ruby15314
CSS21202

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity18.33
▷ Minimum class complexity1.00
▷ Maximum class complexity62.00
Average method complexity2.57
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces0
Interfaces2
Traits0
Classes13
▷ Abstract classes00.00%
▷ Concrete classes13100.00%
▷ Final classes00.00%
Methods180
▷ Static methods21.11%
▷ Public methods17094.44%
▷ Protected methods95.00%
▷ Private methods10.56%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
9 PNG files occupy 1.91MB with 0.88MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
resources/images/bing-logo.png1.93KB1.79KB▼ 7.25%
screenshot-1.png301.33KB96.09KB▼ 68.11%
screenshot-6.png311.80KB103.92KB▼ 66.67%
screenshot-4.png435.63KB148.76KB▼ 65.85%
resources/images/bing-logo@2x.png3.58KB2.76KB▼ 22.90%