78% precisobid-smartformerchant

Code Review | PrecisoBid-SmartForMerchant

WordPress plugin PrecisoBid-SmartForMerchant scored78%from 54 tests.

About plugin

  • Plugin page: precisobid-smartf...
  • Plugin version: 1.0.9
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-6.3.1
  • WordPress version: 6.3.1
  • First release: Oct 10, 2020
  • Latest release: Oct 11, 2023
  • Number of updates: 25
  • Update frequency: every 43.9 days
  • Top authors: preciso (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /533 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

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

Server-side resources used by PrecisoBid-SmartForMerchant
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0039.13 ▼0.03
Dashboard /wp-admin3.31 ▼0.0445.69 ▼18.04
Posts /wp-admin/edit.php3.36 ▲0.0050.34 ▼1.45
Add New Post /wp-admin/post-new.php5.89 ▲0.0084.07 ▼23.18
Media Library /wp-admin/upload.php3.23 ▲0.0037.84 ▼0.02

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 124 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for PrecisoBid-SmartForMerchant
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,840 ▲9413.22 ▼0.951.94 ▲0.2438.19 ▼3.31
Dashboard /wp-admin2,221 ▲155.84 ▲0.93107.88 ▲2.5740.00 ▼7.59
Posts /wp-admin/edit.php2,100 ▼01.99 ▼0.0338.35 ▲0.5035.81 ▼0.84
Add New Post /wp-admin/post-new.php1,545 ▲1423.35 ▲0.26664.82 ▼2.5349.70 ▼15.76
Media Library /wp-admin/upload.php1,400 ▼34.20 ▲0.02107.41 ▲2.5147.85 ▼1.15

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
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

SRP 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following items
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/precisobid-smartformerchant/inc/preciso-plugin-notice.php
  • 8× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/precisobid-smartformerchant/inc/customfunction.php:41
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/precisobid-smartformerchant/inc/termscondition.php:37
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_kses_post() in wp-content/plugins/precisobid-smartformerchant/inc/login.php:36
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/precisobid-smartformerchant/inc/register.php:39
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/precisobid-smartformerchant/store-xml-gen.php:60
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/precisobid-smartformerchant/inc/blank-page.php:37
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/precisobid-smartformerchant/inc/precisodashboard.php:31
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/precisobid-smartformerchant/inc/settings.php:45

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that require attention:
  • Contributors: Plugin contributors not specified
You can look at the official readme.txt

precisobid-smartformerchant/preciso-bid-smart-for-merchant.php 85% from 13 tests

The main PHP script in "PrecisoBid-SmartForMerchant" version 1.0.9 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Main file name: The principal plugin file should be the same as the plugin slug ("precisobid-smartformerchant.php" instead of "preciso-bid-smart-for-merchant.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
No dangerous file extensions were detected78,794 lines of code in 41 files:
LanguageFilesBlank linesComment linesLines of code
SVG50164,273
CSS91,6352617,515
JavaScript166141574,284
PHP102462792,687
XML15335

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions21
▷ Named functions21100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
48 PNG files occupy 0.35MB with 0.13MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/wave.png4.43KB2.02KB▼ 54.53%
assets/images/logo_medium.png13.16KB5.13KB▼ 61.00%
assets/images/user.png8.04KB7.85KB▼ 2.31%
assets/images/logo_large.png31.40KB11.16KB▼ 64.46%
assets/images/download.png0.58KB0.55KB▼ 5.52%