88% bz9-webmaster-tools

Code Review | BZ9 Webmaster Tools

WordPress plugin BZ9 Webmaster Tools scored 88% from 54 tests.

About plugin

  • Plugin page: bz9-webmaster-tools
  • Plugin version: 1.9.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.0
  • WordPress version: 5.9.2
  • First release: Aug 18, 2013
  • Latest release: Oct 2, 2014
  • Number of updates: 26
  • Update frequency: every 15.8 days
  • Top authors: BZ9 (100%)

Code review

54 tests

User reviews

10 reviews

Install metrics

10+ active / 2,483 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▼0.26MB] [CPU: ▼321.24ms] Passed 4 tests

A check of server-side resources used by BZ9 Webmaster Tools
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.65 ▲0.1460.81 ▲1.75
Dashboard /wp-admin3.35 ▼0.0524.52 ▼15.70
Posts /wp-admin/edit.php3.41 ▼0.2326.27 ▼14.77
Add New Post /wp-admin/post-new.php6.15 ▼0.8283.80 ▼1,248.86
Media Library /wp-admin/upload.php3.36 ▲0.0723.74 ▼5.64
BZ9 Tutorials /wp-admin/edit.php?post_type=bz9_tools&page=bz9_tools_tutorials3.3824.59
Add New BZ9 Tool /wp-admin/post-new.php?post_type=bz9_tools3.6839.02
Setup BZ9 Tools /wp-admin/edit.php?post_type=bz9_tools&page=bz9_tools3.3824.70
Saved BZ9 Tools /wp-admin/edit.php?post_type=bz9_tools3.4830.99
Login To BZ9 /wp-admin/edit.php?post_type=bz9_tools&page=bz9_tools_account3.3826.49

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 12 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for BZ9 Webmaster Tools
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,850 ▲9616.18 ▲0.197.04 ▲1.112.50 ▲0.22
Dashboard /wp-admin2,946 ▲856.17 ▼0.02120.12 ▼13.40176.23 ▲15.08
Posts /wp-admin/edit.php2,746 ▲553.12 ▼0.1172.04 ▲6.23176.36 ▲28.71
Add New Post /wp-admin/post-new.php1,703 ▲4218.19 ▲2.61420.55 ▼24.98187.09 ▲32.52
Media Library /wp-admin/upload.php1,755 ▲575.55 ▲0.04123.95 ▼13.46248.29 ▲65.53
BZ9 Tutorials /wp-admin/edit.php?post_type=bz9_tools&page=bz9_tools_tutorials3,1879.14358.05205.71
Add New BZ9 Tool /wp-admin/post-new.php?post_type=bz9_tools1,9593.8877.87217.22
Setup BZ9 Tools /wp-admin/edit.php?post_type=bz9_tools&page=bz9_tools4,26512.18300.33173.26
Saved BZ9 Tools /wp-admin/edit.php?post_type=bz9_tools1,4283.1656.92116.81
Login To BZ9 /wp-admin/edit.php?post_type=bz9_tools&page=bz9_tools_account1,0532.4154.91111.47

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Uninstall script ran successfully

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Good news, no errors were detected

SRP 50% 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
Please fix the following items
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/bz9-webmaster-tools/bz9_webmaster_tools.php:37
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Query' not found in wp-content/plugins/bz9-webmaster-tools/form.php:11

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Please fix the following browser errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=bz9_tools&page=bz9_tools
    • > Console-api (severe) in unknown
    https://maps.googleapis.com/maps/api/js?key=AIzaSyC0jP7teT6j50zBukQfVZHtUL59O0tP-fE 65:174 "Geocoding Service: You must enable Billing on the Google Cloud Project at https://console.cloud.google.com/project/_/billing/enable Learn more at https://developers.google.com/maps/gmp-get-started"
    • > GET request to /wp-admin/edit.php?post_type=bz9_tools&page=bz9_tools_account
    • > Network (severe)
    http://bz9.com/images/login.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/edit.php?post_type=bz9_tools&page=bz9_tools_account
    • > Network (severe)
    http://bz9.com/images/open.png - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
5 plugin tags: tools, shortcode, wordpress, webmaster, bz9

bz9-webmaster-tools/bz9_webmaster_tools.php 85% from 13 tests

This is the main PHP file of "BZ9 Webmaster Tools" version 1.9.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 146 characters long)
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("bz9-webmaster-tools.php" instead of "bz9_webmaster_tools.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin676 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP275120502
PO File14243110
JavaScript11034
CSS11030

PHP code Passed 2 tests

This is a very shot 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.32
Average class complexity45.00
▷ Minimum class complexity45.00
▷ Maximum class complexity45.00
Average method complexity2.69
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods26
▷ Static methods00.00%
▷ Public methods2388.46%
▷ Protected methods00.00%
▷ Private methods311.54%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
3 compressed PNG files occupy 0.00MB
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
js/bz9tools.png0.91KB0.87KB▼ 4.73%
images/bz9tools.png0.91KB0.87KB▼ 4.73%
images/bz9tools32.png2.08KB1.66KB▼ 20.46%