74% beauty-license-verification

Code Review | Licensify

WordPress plugin Licensify scored74%from 54 tests.

About plugin

  • Plugin page: beauty-license-ve...
  • Plugin version: 0.35
  • PHP compatiblity: 7.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.1-6.2
  • WordPress version: 6.3.1
  • First release: Oct 30, 2020
  • Latest release: May 18, 2023
  • Number of updates: 56
  • Update frequency: every 16.6 days
  • Top authors: beauticianlist (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,453 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.54MB] [CPU: ▼4.76ms] Passed 4 tests

Analyzing server-side resources used by Licensify
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /4.08 ▲0.62723.28 ▲682.59
Dashboard /wp-admin3.88 ▲0.5747.68 ▼3.63
Posts /wp-admin/edit.php3.93 ▲0.5747.88 ▼3.06
Add New Post /wp-admin/post-new.php6.40 ▲0.5193.51 ▼13.60
Media Library /wp-admin/upload.php3.74 ▲0.5136.92 ▲1.25

Server storage [IO: ▲1.22MB] [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, 6 new options
New tables
blv_history
New WordPress options
db_upgraded
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Licensify
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,936 ▲17513.46 ▼0.9113.41 ▲11.7936.11 ▼7.93
Dashboard /wp-admin2,209 ▲325.35 ▼0.3372.44 ▼16.3835.61 ▼9.54
Posts /wp-admin/edit.php2,116 ▲161.91 ▼0.1129.69 ▼11.1936.02 ▲0.62
Add New Post /wp-admin/post-new.php1,542 ▲723.06 ▲5.00600.28 ▼5.8651.16 ▼22.95
Media Library /wp-admin/upload.php1,416 ▲133.98 ▼0.2385.64 ▼12.7539.91 ▼4.32

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% 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
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded

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 add_action() in wp-content/plugins/beauty-license-verification/functions/settings.php:21
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/beauty-license-verification/functions/main.php:27

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 "Licensify" v. 0.35 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 detected28,803 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript43,3272,13215,216
CSS31973710,444
PHP64541033,141
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.41
Average class complexity66.80
▷ Minimum class complexity25.00
▷ Maximum class complexity150.00
Average method complexity4.62
▷ Minimum method complexity1.00
▷ Maximum method complexity22.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods91
▷ Static methods00.00%
▷ Public methods7582.42%
▷ Protected methods00.00%
▷ Private methods1617.58%
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/history.png1.41KB1.78KB0.00%
functions/img/button.png1.40KB1.53KB0.00%
functions/img/login.png1.58KB1.84KB0.00%