10% flora-lms

Code Review | Flora LMS

WordPress plugin Flora LMS scored10%from 54 tests.

About plugin

  • Plugin page: flora-lms
  • Plugin version: 1.0
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.3.2
  • WordPress version: 6.3.1
  • First release: Feb 5, 2020
  • Latest release: Feb 7, 2020
  • Number of updates: 11
  • Update frequency: every 0.3 days
  • Top authors: ispringsolutions (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /484 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The following installer errors require your attention
  • Install procedure had errors
    • > User deprecated in wp-includes/functions.php+5453
    Function get_page_by_title is deprecated since version 6.2.0! Use WP_Query instead.

Server metrics [RAM: ▼0.38MB] [CPU: ▼13.35ms] Passed 4 tests

Server-side resources used by Flora LMS
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.77 ▲0.3144.57 ▲1.08
Dashboard /wp-admin3.62 ▲0.3254.02 ▲0.35
Posts /wp-admin/edit.php3.67 ▲0.3255.77 ▲5.13
Add New Post /wp-admin/post-new.php3.43 ▼2.4540.25 ▼57.76
Media Library /wp-admin/upload.php3.54 ▲0.3239.16 ▲2.95
Courses /wp-admin/edit.php?post_type=course3.5940.29
Add New /wp-admin/post-new.php?post_type=course3.6649.81

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 52 new files
Database: 2 new tables, 6 new options
New tables
flora_config
flora_course
New WordPress options
db_upgraded
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

Flora LMS: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,855 ▲9414.80 ▲0.381.73 ▼0.3042.22 ▼1.89
Dashboard /wp-admin2,246 ▲435.86 ▲0.0199.10 ▼3.8677.75 ▲33.89
Posts /wp-admin/edit.php2,143 ▲432.02 ▲0.0038.27 ▼0.1236.90 ▼0.19
Add New Post /wp-admin/post-new.php1,713 ▲18122.05 ▼1.25764.11 ▲99.7748.43 ▼5.95
Media Library /wp-admin/upload.php1,434 ▲344.32 ▲0.11116.21 ▲10.0188.94 ▲43.58
Courses /wp-admin/edit.php?post_type=course1,1101.9331.9430.46
Add New /wp-admin/post-new.php?post_type=course2,1827.55169.46124.07

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • Uninstall procedure validation failed for this plugin
    • > Notice in wp-content/plugins/flora-lms/src/Infrastructure/Repository.php+160
    Undefined property: Src\Infrastructure\Repository::$coursePageName
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 0% 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
Almost there! Just fix the following items
  • 2× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/flora-lms/vendor/firebase/php-jwt/tests/bootstrap.php
    • > /wp-content/plugins/flora-lms/flora-lms.php
  • 7× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Interface 'Src\\App\\HttpClientInterface' not found in wp-content/plugins/flora-lms/src/App/WordpressAdapterInterface.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/flora-lms/vendor/firebase/php-jwt/tests/JWTTest.php:7
    • > PHP Fatal error
      Uncaught Error: Interface 'Src\\App\\RepositoryInterface' not found in wp-content/plugins/flora-lms/src/Infrastructure/Repository.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_errors() in wp-content/plugins/flora-lms/templates/admin.php:3
    • > PHP Fatal error
      Uncaught Error: Interface 'Src\\App\\FloraLMSAdapterInterface' not found in wp-content/plugins/flora-lms/src/Infrastructure/FloraLMSAdapter.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/flora-lms/templates/products.php:3
    • > PHP Fatal error
      Uncaught Error: Interface 'Src\\App\\WordpressAdapterInterface' not found in wp-content/plugins/flora-lms/src/Infrastructure/WordpressAdapter.php:8

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that require attention:
  • Contributors: Contributors not specified
The official readme.txt might help

flora-lms/flora-lms.php 92% from 13 tests

The entry point to "Flora LMS" version 1.0 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Git Repository: There should be no Git repositories present in your plugin

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin2,327 lines of code in 41 files:
LanguageFilesBlank linesComment linesLines of code
PHP333896811,993
Markdown1320168
JSON30095
Bourne Shell12431
XML11018
YAML14018
SVG1004

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity6.50
▷ Minimum class complexity1.00
▷ Maximum class complexity47.00
Average method complexity1.79
▷ Minimum method complexity1.00
▷ Maximum method complexity21.00
Code structure
Namespaces8
Interfaces4
Traits0
Classes20
▷ Abstract classes00.00%
▷ Concrete classes20100.00%
▷ Final classes15.00%
Methods212
▷ Static methods2210.38%
▷ Public methods19591.98%
▷ Protected methods00.00%
▷ Private methods178.02%
Functions6
▷ Named functions350.00%
▷ Anonymous functions350.00%
Constants34
▷ Global constants00.00%
▷ Class constants34100.00%
▷ Public constants34100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
3 PNG files occupy 0.16MB with 0.09MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-1.png31.51KB12.50KB▼ 60.34%
assets/screenshot-2.png84.61KB33.66KB▼ 60.21%
assets/screenshot-3.png45.01KB19.35KB▼ 57.01%