10% local-business-microdata-widget

Code Review | Local Business Microdata Widget

WordPress plugin Local Business Microdata Widget scored 10% from 54 tests.

About plugin

  • Plugin page: local-business-mi...
  • Plugin version: 0.3.0
  • PHP version: 7.4.16
  • WordPress compatibility: 2.8.0-3.7
  • WordPress version: 6.3.1
  • First release: Nov 2, 2013
  • Latest release: Nov 19, 2013
  • Number of updates: 13
  • Update frequency: every 2.1 days
  • Top authors: theMaab (100%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active / 2,643 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Please fix the following installer errors
  • Install procedure had errors
    • > Deprecated in wp-content/plugins/local-business-microdata-widget/localbusiness-microdata-widget.php+28
    Methods with the same name as their class will not be constructors in a future version of PHP; mywpcms_local_microdata_widget has a deprecated constructor

Server metrics [RAM: ▼1.54MB] [CPU: ▼50.11ms] Passed 4 tests

This is a short check of server-side resources used by Local Business Microdata Widget
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.44 ▼1.024.81 ▼38.51
Dashboard /wp-admin2.46 ▼0.848.82 ▼42.63
Posts /wp-admin/edit.php2.46 ▼0.897.08 ▼41.17
Add New Post /wp-admin/post-new.php2.46 ▼3.426.66 ▼78.14
Media Library /wp-admin/upload.php2.46 ▼0.776.77 ▼26.77

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 2 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
can_compress_scripts
widget_mywpcms_local_microdata_widget
widget_recent-posts
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Local Business Microdata Widget
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.28 ▼1.024.20 ▲2.4537.82 ▼4.74
Dashboard /wp-admin2,203 ▲155.83 ▲0.9399.89 ▼17.3141.31 ▼6.60
Posts /wp-admin/edit.php2,086 ▼32.02 ▼0.0136.72 ▼0.7933.65 ▼0.58
Add New Post /wp-admin/post-new.php1,542 ▲1418.37 ▲0.09651.68 ▲13.4158.37 ▲5.45
Media Library /wp-admin/upload.php1,391 ▲64.19 ▲0.01105.14 ▼2.7046.52 ▲3.25

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin did not uninstall without warnings or errors
    • > Deprecated in wp-content/plugins/local-business-microdata-widget/localbusiness-microdata-widget.php+28
    Methods with the same name as their class will not be constructors in a future version of PHP; mywpcms_local_microdata_widget has a deprecated constructor
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_mywpcms_local_microdata_widget
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests Passed 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)
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

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
8 plugin tags: widget, microdata, rich snippet, schema, local business...

local-business-microdata-widget/localbusiness-microdata-widget.php 92% from 13 tests

The main PHP script in "Local Business Microdata Widget" version 0.3.0 is automatically included on every request by WordPress
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("local-business-microdata-widget.php" instead of "localbusiness-microdata-widget.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin617 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP18622617

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.16
Average class complexity76.00
▷ Minimum class complexity76.00
▷ Maximum class complexity76.00
Average method complexity19.75
▷ Minimum method complexity1.00
▷ Maximum method complexity73.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
PNG images were not found in this plugin