94% automatorwp-learnpress-integration

Code Review | AutomatorWP - LearnPress integration

WordPress plugin AutomatorWP - LearnPress integration scored 94% from 54 tests.

About plugin

  • Plugin page: automatorwp-learn...
  • Plugin version: 1.0.5
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-5.8
  • WordPress version: 5.8.1
  • First release: Jun 4, 2020
  • Latest release: Aug 4, 2021
  • Number of updates: 15
  • Update frequency: every 28.4 days
  • Top authors: rubengc (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active / 2,949 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.02MB] [CPU: ▼137.16ms] Passed 4 tests

A check of server-side resources used by AutomatorWP - LearnPress integration
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.86 ▲0.0236.23 ▲6.67
Dashboard /wp-admin3.08 ▲0.0347.20 ▲6.44
Posts /wp-admin/edit.php3.13 ▲0.0343.63 ▲3.33
Add New Post /wp-admin/post-new.php5.45 ▲0.0192.03 ▼558.89
Media Library /wp-admin/upload.php3.02 ▲0.0232.09 ▲0.47

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 8 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

AutomatorWP - LearnPress integration: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,707 ▲11115.83 ▲0.2610.08 ▼1.5546.55 ▲0.92
Dashboard /wp-admin2,998 ▲645.92 ▼0.14144.32 ▼3.68109.52 ▲3.20
Posts /wp-admin/edit.php2,770 ▲312.73 ▲0.0168.24 ▼5.9984.30 ▲1.04
Add New Post /wp-admin/post-new.php1,687 ▲418.80 ▲0.02372.23 ▲2.00111.32 ▲6.01
Media Library /wp-admin/upload.php1,839 ▲325.08 ▲0.05162.09 ▲4.97123.67 ▲3.69

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
This plugin's uninstaller ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please take a closer look at the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/automatorwp-learnpress-integration/automatorwp-learnpress.php:242

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
5 plugin tags: learn, learnpress, learning, elearning, automatorwp

automatorwp-learnpress-integration/automatorwp-learnpress.php 92% from 13 tests

The main PHP file in "AutomatorWP - LearnPress integration" ver. 1.0.5 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("automatorwp-learnpress-integration.php" instead of "automatorwp-learnpress.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
There were no executable files found in this plugin426 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP5126255333
SVG11193

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity6.40
▷ Minimum class complexity3.00
▷ Maximum class complexity13.00
Average method complexity2.35
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes120.00%
Methods20
▷ Static methods15.00%
▷ Public methods1575.00%
▷ Protected methods00.00%
▷ Private methods525.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG images were found in this plugin