88% devvn-local-store

Code Review | DevVN Local Store

WordPress plugin DevVN Local Store scored 88% from 54 tests.

About plugin

  • Plugin page: devvn-local-store
  • Plugin version: 1.0.8
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3-4.9.7
  • WordPress version: 5.8.1
  • First release: May 17, 2017
  • Latest release: Jul 28, 2018
  • Number of updates: 20
  • Update frequency: every 21.9 days
  • Top authors: levantoan (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

2,000+ active / 5,382 total downloads

Benchmarks

Plugin footprint Passed 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.18MB] [CPU: ▼140.12ms] Passed 4 tests

This is a short check of server-side resources used by DevVN Local Store
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.00 ▲0.2836.32 ▲12.58
Dashboard /wp-admin3.22 ▲0.1745.78 ▲1.40
Posts /wp-admin/edit.php3.33 ▲0.2345.93 ▲0.85
Add New Post /wp-admin/post-new.php5.59 ▲0.1591.04 ▼566.06
Media Library /wp-admin/upload.php3.17 ▲0.1637.91 ▲3.33
Local Address /wp-admin/edit-tags.php?taxonomy=local_category&post_type=local-store3.1634.11
Add New /wp-admin/post-new.php?post_type=local-store3.2860.86
Settings /wp-admin/edit.php?post_type=local-store&page=devvnls_settings3.1839.37
All Stores /wp-admin/edit.php?post_type=local-store3.2132.14

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 23 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for DevVN Local Store
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,720 ▲12415.80 ▲0.248.69 ▲0.0046.99 ▲1.83
Dashboard /wp-admin3,008 ▲776.01 ▼0.09153.10 ▲6.23113.30 ▼1.15
Posts /wp-admin/edit.php2,780 ▲412.70 ▲0.0067.71 ▲3.5685.83 ▲1.66
Add New Post /wp-admin/post-new.php1,709 ▲2618.31 ▼0.01376.52 ▲12.59111.04 ▲2.36
Media Library /wp-admin/upload.php1,851 ▲385.02 ▲0.02151.77 ▲5.13117.42 ▲6.95
Local Address /wp-admin/edit-tags.php?taxonomy=local_category&post_type=local-store1,7772.5062.0574.67
Add New /wp-admin/post-new.php?post_type=local-store3,98112.67307.27242.29
Settings /wp-admin/edit.php?post_type=local-store&page=devvnls_settings1,7054.7689.7778.98
All Stores /wp-admin/edit.php?post_type=local-store1,4912.8375.6961.10

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Uninstall script ran successfully

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

SRP 50% from 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
Please take a closer look at the following
  • 4× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/devvn-local-store/inc/dvls-shortcode.php
    • > /wp-content/plugins/devvn-local-store/inc/dvls-metabox.php
    • > /wp-content/plugins/devvn-local-store/devvn-local-store.php
    • > /wp-content/plugins/devvn-local-store/inc/dvls-optionpage.php

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Please fix the following user-side errors
    • > GET request to /wp-admin/post-new.php?post_type=local-store
    • > Console-api (severe) in unknown
    https://maps.googleapis.com/maps/api/js?key&libraries=places&ver=1.0.8 82:375 "You are using this API without a key. See https://developers.google.com/maps/documentation/javascript/error-messages?utm_source=maps_js&utm_medium=degraded&utm_campaign=billing#api-key-and-billing-errors"
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=local-store
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=5.8.1 1:31702 Uncaught Qe: Map: Expected mapDiv of type HTMLElement but was passed null.

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that need to be fixed:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Store infor), #2 (Search and view stores), #3 (Admin area), #4 (Setting area)
The official readme.txt might help

devvn-local-store/devvn-local-store.php Passed 13 tests

This is the main PHP file of "DevVN Local Store" version 1.0.8, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
27 characters long description:
Find a Local Store by DevVN

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
No dangerous file extensions were detected2,021 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP47836825
CSS2250511
JavaScript22427450
PO File19898223
XML10012

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity94.00
▷ Minimum class complexity94.00
▷ Maximum class complexity94.00
Average method complexity3.82
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods33
▷ Static methods13.03%
▷ Public methods33100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
6 PNG files occupy 0.59MB with 0.25MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png293.36KB88.57KB▼ 69.81%
screenshot-3.png149.77KB44.33KB▼ 70.40%
assets/images/red.png1.01KB0.89KB▼ 12.19%
assets/images/close-btn.png0.78KB0.80KB0.00%
screenshot-1.png104.99KB37.20KB▼ 64.57%