78% vendor-city

Code Review | Vendor City

WordPress plugin Vendor City scored78%from 54 tests.

About plugin

  • Plugin page: vendor-city
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-4.7
  • WordPress version: 6.3.1
  • First release: Dec 20, 2016
  • Latest release: Jan 1, 2017
  • Number of updates: 15
  • Update frequency: every 0.7 days
  • Top authors: themestulip (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /8,684 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.07MB] [CPU: ▲0.10ms] Passed 4 tests

An overview of server-side resources used by Vendor City
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0748.77 ▲9.76
Dashboard /wp-admin3.37 ▲0.0754.58 ▲1.78
Posts /wp-admin/edit.php3.47 ▲0.1157.64 ▲4.42
Add New Post /wp-admin/post-new.php5.95 ▲0.0788.44 ▼14.11
Media Library /wp-admin/upload.php3.30 ▲0.0744.58 ▲8.32
Add New /wp-admin/post-new.php?post_type=vendor3.3150.88
City /wp-admin/edit-tags.php?taxonomy=city&post_type=vendor3.2942.05
All Vendors /wp-admin/edit.php?post_type=vendor3.3243.36

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
db_upgraded
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for Vendor City
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,834 ▲8813.18 ▼1.461.83 ▼0.1044.40 ▲1.42
Dashboard /wp-admin2,234 ▲435.81 ▼0.07101.54 ▲1.5141.76 ▼2.37
Posts /wp-admin/edit.php2,120 ▲311.97 ▼0.0836.27 ▼4.3333.18 ▼4.79
Add New Post /wp-admin/post-new.php1,559 ▲2623.36 ▲0.24647.89 ▲31.5355.11 ▲0.93
Media Library /wp-admin/upload.php1,422 ▲314.22 ▼0.01104.05 ▲4.4849.91 ▲6.02
Add New /wp-admin/post-new.php?post_type=vendor1,6042.5857.3753.91
City /wp-admin/edit-tags.php?taxonomy=city&post_type=vendor1,2902.1326.6028.67
All Vendors /wp-admin/edit.php?post_type=vendor1,1011.9733.7629.98

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

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
These errors were triggered by the plugin
    • > GET request to /wp-admin/post-new.php?post_type=vendor
    • > Notice in wp-content/plugins/vendor-city/vendor-city.php+83
    Undefined index: vendorname
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=vendor
    • > Notice in wp-content/plugins/vendor-city/vendor-city.php+98
    Trying to access array offset on value of type null
    • > GET request to /wp-admin/post-new.php?post_type=vendor
    • > Notice in wp-content/plugins/vendor-city/vendor-city.php+86
    Undefined index: establishment_year
    • > GET request to /wp-admin/post-new.php?post_type=vendor
    • > Notice in wp-content/plugins/vendor-city/vendor-city.php+89
    Undefined index: street_name
    • > GET request to /wp-admin/post-new.php?post_type=vendor
    • > Notice in wp-content/plugins/vendor-city/vendor-city.php+92
    Undefined index: area_name
    • > GET request to /wp-admin/post-new.php?post_type=vendor
    • > Notice in wp-content/plugins/vendor-city/vendor-city.php+95
    Undefined index: state
    • > GET request to /wp-admin/post-new.php?post_type=vendor
    • > Notice in wp-content/plugins/vendor-city/vendor-city.php+98
    Undefined index: pincode

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
Please take a closer look at the following
  • 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/vendor-city/vendor-city.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/vendor-city/shortcode.php:127

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need to be fixed:
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === vendor-city === )
Please take inspiration from this readme.txt

vendor-city/vendor-city.php Passed 13 tests

The main file in "Vendor City" v. 1.0.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
43 characters long description:
It will show all vendor list with location.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Everything looks great! No dangerous files found in this plugin249 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP2010249

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.20
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%
Functions6
▷ Named functions6100.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
4 PNG files occupy 0.13MB with 0.06MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png26.69KB14.72KB▼ 44.83%
screenshot-3.png38.96KB20.69KB▼ 46.89%
screenshot-2.png26.42KB14.58KB▼ 44.83%
screenshot-4.png39.58KB21.78KB▼ 44.98%