84% beauty-license-verification

Code Review | Beauty License Verification

WordPress plugin Beauty License Verification scored 84% from 54 tests.

About plugin

  • Plugin page: beauty-license-ve...
  • Plugin version: 0.20
  • PHP compatiblity: 7.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.1-5.8
  • WordPress version: 5.8.1
  • First release: Oct 30, 2020
  • Latest release: Oct 29, 2021
  • Number of updates: 33
  • Update frequency: every 11.1 days
  • Top authors: beauticianlist (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 488 total downloads

Benchmarks

Plugin footprint 83% 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.45MB] [CPU: ▼142.89ms] Passed 4 tests

Analyzing server-side resources used by Beauty License Verification
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.782,656.16 ▲2,634.68
Dashboard /wp-admin3.54 ▲0.4853.70 ▲4.00
Posts /wp-admin/edit.php3.59 ▲0.4850.84 ▲2.07
Add New Post /wp-admin/post-new.php5.83 ▲0.4099.84 ▼578.16
Media Library /wp-admin/upload.php3.42 ▲0.4236.33 ▲0.55

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 22 new files
Database: 1 new table, no new options
New tables
blv_history

Browser metrics Passed 4 tests

An overview of browser requirements for Beauty License Verification
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,894 ▲29817.40 ▲1.7533.61 ▲23.5255.95 ▲5.23
Dashboard /wp-admin2,986 ▲555.68 ▼0.43148.29 ▼8.95115.36 ▼3.38
Posts /wp-admin/edit.php2,759 ▲202.52 ▼0.1970.12 ▼6.9590.70 ▼9.16
Add New Post /wp-admin/post-new.php1,628 ▼5521.56 ▲2.79431.35 ▼0.34119.97 ▲7.21
Media Library /wp-admin/upload.php1,809 ▲24.88 ▼0.17151.28 ▼17.63136.34 ▲14.52

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • Zombie tables were found after uninstall: 1 table
    • blv_history

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 3× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/beauty-license-verification/index.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/beauty-license-verification/functions/main.php:23
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/beauty-license-verification/functions/settings.php:19

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)
Everything seems fine, but this is not an exhaustive test

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
2 plugin tags: store, e-commerce

beauty-license-verification/index.php 92% from 13 tests

The main file in "Beauty License Verification" v. 0.20 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("beauty-license-verification.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected27,639 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript43,3022,15115,086
CSS395369,867
PHP6399972,684
SVG2002

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity58.80
▷ Minimum class complexity23.00
▷ Maximum class complexity136.00
Average method complexity4.49
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods83
▷ Static methods00.00%
▷ Public methods6983.13%
▷ Protected methods00.00%
▷ Private methods1416.87%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.00%
Constants2
▷ Global constants00.00%
▷ Class constants2100.00%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
3 compressed PNG files occupy 0.00MB
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
functions/img/login.png1.58KB1.84KB0.00%
functions/img/button.png1.40KB1.53KB0.00%
functions/img/history.png1.41KB1.78KB0.00%