89% vandar-learnpress

Code Review | Vandar.io learnpress

WordPress plugin Vandar.io learnpress scored89%from 54 tests.

About plugin

  • Plugin page: vandar-learnpress
  • Plugin version: 2.1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-6.3.0
  • WordPress version: 6.3.1
  • First release: Sep 2, 2020
  • Latest release: Aug 10, 2023
  • Number of updates: 21
  • Update frequency: every 53.5 days
  • Top authors: vandarpay (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,675 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.01MB] [CPU: ▼4.70ms] Passed 4 tests

Server-side resources used by Vandar.io learnpress
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0142.22 ▼2.96
Dashboard /wp-admin3.32 ▲0.0150.34 ▼3.21
Posts /wp-admin/edit.php3.37 ▲0.0153.76 ▲1.01
Add New Post /wp-admin/post-new.php5.90 ▲0.0184.95 ▼13.64
Media Library /wp-admin/upload.php3.24 ▲0.0141.19 ▲5.06

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 12 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
db_upgraded
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

Vandar.io learnpress: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,807 ▲4614.24 ▼0.121.70 ▲0.1048.94 ▲9.38
Dashboard /wp-admin2,216 ▲425.58 ▼0.0088.85 ▼5.5743.33 ▲4.29
Posts /wp-admin/edit.php2,122 ▲221.98 ▼0.0139.14 ▼1.5042.28 ▲6.59
Add New Post /wp-admin/post-new.php1,549 ▲2123.18 ▼0.01682.57 ▲58.0472.23 ▲24.61
Media Library /wp-admin/upload.php1,421 ▲184.18 ▼0.02107.79 ▲12.4651.60 ▲9.64

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests Passed 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 Passed 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
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
6 plugin tags: br, learnpress, vandar, learn press, pay...

vandar-learnpress/vandar-learnpress.php 92% from 13 tests

"Vandar.io learnpress" version 2.1.3's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Description: The description should be shorter than 140 characters (currently 143 characters long)

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 detected453 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP57213398
CSS10032
Markdown17023

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity12.00
▷ Minimum class complexity1.00
▷ Maximum class complexity33.00
Average method complexity2.22
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods27
▷ Static methods00.00%
▷ Public methods2177.78%
▷ Protected methods622.22%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants7100.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
2 PNG files occupy 0.03MB with 0.03MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/vandar.png35.30KB9.12KB▼ 74.18%
(invalid) assets/images/__MACOSX/._Vandar Logo.png0.12KB0.00KB▼ 100.00%