89% learnpress-prerequisites-courses

Code Review | LearnPress - Prerequisites Courses

WordPress plugin LearnPress - Prerequisites Courses scored89%from 54 tests.

About plugin

  • Plugin page: learnpress-prereq...
  • Plugin version: 4.0.6
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-6.0
  • WordPress version: 6.3.1
  • First release: Jun 16, 2015
  • Latest release: Aug 12, 2022
  • Number of updates: 29
  • Update frequency: every 90.2 days
  • Top authors: ThimPress (55.17%)thongta (20.69%)tunnhn (17.24%)leehld (13.79%)halink0803 (6.9%)

Code review

54 tests

User reviews

1 review

Install metrics

8,000+ active /148,596 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.00MB] [CPU: ▼2.86ms] Passed 4 tests

An overview of server-side resources used by LearnPress - Prerequisites Courses
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0038.91 ▼3.95
Dashboard /wp-admin3.30 ▲0.0043.11 ▼3.31
Posts /wp-admin/edit.php3.36 ▲0.0047.43 ▼1.98
Add New Post /wp-admin/post-new.php5.89 ▲0.0094.11 ▼2.21
Media Library /wp-admin/upload.php3.23 ▲0.0034.10 ▲1.11

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for LearnPress - Prerequisites Courses
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲9013.33 ▼1.042.03 ▼0.0541.80 ▲0.53
Dashboard /wp-admin2,206 ▲184.84 ▼1.01107.77 ▲7.7939.55 ▼3.59
Posts /wp-admin/edit.php2,089 ▼02.05 ▲0.0339.78 ▼0.3534.62 ▼0.45
Add New Post /wp-admin/post-new.php1,533 ▼123.27 ▼0.01664.61 ▼3.5951.84 ▼2.34
Media Library /wp-admin/upload.php1,391 ▼04.19 ▼0.1793.23 ▼2.9041.55 ▼1.01

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 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
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 81% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Please fix the following attributes:
  • Screenshots: Screenshot #1 (LearnPress Prerequisite screenshot.) image missing
  • Tags: Please delete some tags, you are using 13 tag instead of maximum 10
  • Donate link: Invalid URI ("")
You can look at the official readme.txt

learnpress-prerequisites-courses/learnpress-prerequisites-courses.php Passed 13 tests

Analyzing the main PHP file in "LearnPress - Prerequisites Courses" version 4.0.6
63 characters long description:
Course you have to finish before you can enroll to this course.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Success! There were no dangerous files found in this plugin303 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP477177283
CSS17020

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity15.00
▷ Minimum class complexity2.00
▷ Maximum class complexity40.00
Average method complexity3.62
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods16
▷ Static methods212.50%
▷ Public methods1381.25%
▷ Protected methods212.50%
▷ Private methods16.25%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants480.00%
▷ Class constants120.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
There were not PNG files found in your plugin