74% dealers-and-branches

Code Review | Dealers And Branches

WordPress plugin Dealers And Branches scored 74% from 54 tests.

About plugin

  • Plugin page: dealers-and-branches
  • Plugin version: 2018.1.0
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.1.1
  • WordPress version: 6.3.1
  • First release: Aug 15, 2018
  • Latest release: Apr 1, 2019
  • Number of updates: 33
  • Update frequency: every 7.8 days
  • Top authors: caglaror (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 722 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼1.21ms] Passed 4 tests

A check of server-side resources used by Dealers And Branches
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0339.04 ▼4.06
Dashboard /wp-admin3.33 ▲0.0346.97 ▼2.26
Posts /wp-admin/edit.php3.38 ▲0.0247.57 ▼0.32
Add New Post /wp-admin/post-new.php5.91 ▲0.0295.39 ▲5.65
Media Library /wp-admin/upload.php3.25 ▲0.0236.67 ▲1.82

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 27 new files
Database: 2 new tables, 6 new options
New tables
wp_dealers_and_branches_vars
wp_dealers_and_branches
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for Dealers And Branches
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,822 ▲8713.47 ▼1.124.04 ▲2.2739.25 ▼10.14
Dashboard /wp-admin2,220 ▲324.93 ▼0.9397.83 ▼17.5782.83 ▲38.32
Posts /wp-admin/edit.php2,097 ▲82.00 ▼0.0238.60 ▲0.6536.27 ▼0.22
Add New Post /wp-admin/post-new.php1,524 ▼1023.40 ▲0.18642.97 ▼40.7750.30 ▼2.49
Media Library /wp-admin/upload.php1,402 ▲144.14 ▼0.1098.41 ▲0.0372.90 ▲31.93

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • Zombie tables were found after uninstall: 2 tables
    • wp_dealers_and_branches
    • wp_dealers_and_branches_vars
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 75% from 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)
The smoke test was a success, however most plugin functionality was not tested

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
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_enqueue_script() in wp-content/plugins/dealers-and-branches/dnb_panel.php:4

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 97% 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
Please fix the following attributes:
  • Screenshots: Please add an image for screenshot #1 (screenshot-1.png)
The official readme.txt might help

dealers-and-branches/dealers-and-branches.php Passed 13 tests

The primary PHP file in "Dealers And Branches" version 2018.1.0 is used by WordPress to initiate all plugin functionality
49 characters long description:
Dealing with dealers and branches list. CRUD etc.

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
There were no executable files found in this plugin7,213 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
CSS2979305,221
JavaScript43412221,175
PHP322879817

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity7.00
▷ Minimum class complexity7.00
▷ Maximum class complexity7.00
Average method complexity2.20
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods360.00%
▷ Public methods360.00%
▷ Protected methods00.00%
▷ Private methods240.00%
Functions11
▷ Named functions11100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants00.00%
▷ Class constants2100.00%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
16 PNG files occupy 0.19MB with 0.05MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
css/images/ui-bg_glass_65_ffffff_1x400.png0.10KB0.10KB▼ 5.71%
assets/screenshot-1.PNG141.17KB71.72KB▼ 49.20%
css/images/ui-icons_444444_256x240.png6.84KB4.18KB▼ 38.90%
css/images/ui-bg_glass_75_dadada_1x400.png0.11KB0.16KB0.00%
css/images/ui-bg_highlight-soft_75_cccccc_1x100.png0.27KB0.14KB▼ 47.84%