84% local-business-details

Code Review | Local Business Details

WordPress plugin Local Business Details scored84%from 54 tests.

About plugin

  • Plugin page: local-business-de...
  • Plugin version: 0.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7.0-5.8
  • WordPress version: 6.3.1
  • First release: Aug 1, 2021
  • Latest release: Aug 1, 2021
  • Number of updates: 3
  • Update frequency: every 1.3 days
  • Top authors: delvec28 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /343 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.01MB] [CPU: ▼3.25ms] Passed 4 tests

This is a short check of server-side resources used by Local Business Details
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0136.55 ▼7.25
Dashboard /wp-admin3.32 ▼0.0251.65 ▼10.55
Posts /wp-admin/edit.php3.38 ▲0.0264.08 ▲17.08
Add New Post /wp-admin/post-new.php5.90 ▲0.0294.87 ▲2.61
Media Library /wp-admin/upload.php3.25 ▲0.0240.53 ▲2.21
Local Business /wp-admin/options-general.php?page=local-business3.2131.46

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts
db_upgraded
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Local Business Details
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,809 ▲6314.47 ▲0.162.15 ▲0.3142.19 ▼4.51
Dashboard /wp-admin2,207 ▲195.79 ▼0.10103.13 ▼13.9740.22 ▼2.73
Posts /wp-admin/edit.php2,090 ▲12.00 ▼0.0040.95 ▲2.9734.22 ▼0.22
Add New Post /wp-admin/post-new.php1,536 ▲1723.48 ▲0.26608.06 ▼64.6358.43 ▲2.95
Media Library /wp-admin/upload.php1,392 ▲44.18 ▲0.0497.23 ▼21.7046.99 ▲2.77
Local Business /wp-admin/options-general.php?page=local-business8122.0323.5328.60

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

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
The following issues need your attention
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/local-business-details/inc/lbd-info.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/local-business-details/local-biz-details.php:24

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 96% 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
4 plugin tags: local business, phone call, contact button, click to call

local-business-details/local-biz-details.php 92% from 13 tests

Analyzing the main PHP file in "Local Business Details" version 0.1.0
The following require your attention:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("local-business-details.php" instead of "local-biz-details.php")

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
There were no executable files found in this plugin354 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP265178230
CSS242114
JavaScript12210

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity27.00
▷ Minimum class complexity27.00
▷ Maximum class complexity27.00
Average method complexity2.53
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods17
▷ Static methods00.00%
▷ Public methods17100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
No PNG files were detected