78% dozent-lms-certificate

Code Review | Dozent LMS Certificate

WordPress plugin Dozent LMS Certificate scored78%from 54 tests.

About plugin

  • Plugin page: dozent-lms-certif...
  • Plugin version: 1.0.1
  • PHP compatiblity: 7.1.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.7
  • WordPress version: 6.3.1
  • First release: Feb 23, 2021
  • Latest release: Apr 15, 2021
  • Number of updates: 6
  • Update frequency: every 8.7 days
  • Top authors: themeqx (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /1,285 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▼9.39MB] [CPU: ▼1,938,673.34ms] Passed 4 tests

Server-side resources used by Dozent LMS Certificate
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0443.76 ▲2.44
Dashboard /wp-admin3.40 ▼37.7252.72 ▼7,754,662.41
Posts /wp-admin/edit.php3.51 ▲0.1151.02 ▼0.73
Add New Post /wp-admin/post-new.php5.98 ▲0.0586.17 ▼32.64
Media Library /wp-admin/upload.php3.32 ▲0.0543.12 ▲6.08

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 368 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
DLC_VERSION
widget_theysaidso_widget
can_compress_scripts
db_upgraded
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by Dozent LMS Certificate
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5414.35 ▲0.232.01 ▲0.4245.59 ▲7.44
Dashboard /wp-admin2,200 ▲235.64 ▲0.1094.97 ▲4.7542.21 ▼3.75
Posts /wp-admin/edit.php2,111 ▲112.14 ▲0.1635.39 ▼9.4734.32 ▼2.25
Add New Post /wp-admin/post-new.php1,537 ▲1123.40 ▲0.40671.35 ▼32.9853.57 ▲1.97
Media Library /wp-admin/upload.php1,411 ▲114.16 ▼0.03112.20 ▲4.5148.95 ▲7.39

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: 7 options
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • DLC_VERSION

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
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
The following issues need your attention
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/dozent-lms-certificate/vendor/sabberworm/php-css-parser/tests/quickdump.php
  • 197× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Notice
      Undefined variable: fontDir in wp-content/plugins/dozent-lms-certificate/vendor/dompdf/dompdf/lib/fonts/dompdf_font_family_cache.php on line 69
    • > PHP Fatal error
      Uncaught Error: Class 'Svg\\Tag\\Shape' not found in wp-content/plugins/dozent-lms-certificate/vendor/phenx/php-svg-lib/src/Svg/Tag/Ellipse.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'FontLib\\Table\\Table' not found in wp-content/plugins/dozent-lms-certificate/vendor/phenx/php-font-lib/src/FontLib/Table/Type/maxp.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/dozent-lms-certificate/vendor/sabberworm/php-css-parser/tests/Sabberworm/CSS/OutputFormatTest.php:27
    • > PHP Fatal error
      Uncaught Error: Class 'Svg\\Tag\\AbstractTag' not found in wp-content/plugins/dozent-lms-certificate/vendor/phenx/php-svg-lib/src/Svg/Tag/LinearGradient.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'Sabberworm\\CSS\\Value\\ValueList' not found in wp-content/plugins/dozent-lms-certificate/vendor/sabberworm/php-css-parser/lib/Sabberworm/CSS/Value/LineName.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'Dompdf\\Renderer\\Block' not found in wp-content/plugins/dozent-lms-certificate/vendor/dompdf/dompdf/src/Renderer/Image.php:20
    • > PHP Notice
      Undefined variable: fontDir in wp-content/plugins/dozent-lms-certificate/vendor/dompdf/dompdf/lib/fonts/dompdf_font_family_cache.php on line 18
    • > PHP Notice
      Undefined variable: fontDir in wp-content/plugins/dozent-lms-certificate/vendor/dompdf/dompdf/lib/fonts/dompdf_font_family_cache.php on line 5
    • > PHP Fatal error
      Uncaught Error: Class 'Dompdf\\FrameReflower\\AbstractFrameReflower' not found in wp-content/plugins/dozent-lms-certificate/vendor/dompdf/dompdf/src/FrameReflower/NullFrameReflower.php:19

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
5 plugin tags: pdf, lms, dozentlms, course, elearning

dozent-lms-certificate/dozent-lms-certificate.php 92% from 13 tests

The main file in "Dozent LMS Certificate" v. 1.0.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
  • Requires at least: The required version number must match the one declared in readme.txt ("4.5" instead of "4.7")

Code Analysis 97% from 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 plugin51,497 lines of code in 284 files:
LanguageFilesBlank linesComment linesLines of code
PHP2228,96415,68949,262
Markdown62650947
CSS4313760700
JSON600377
XML532186
HTML10017
SVG1008

PHP code 50% from 2 tests

An overview of cyclomatic complexity and code structure
It is recommended to fix the following
  • Method cyclomatic complexity has to be reduced to less than 100 (currently 652)
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity35.12
▷ Minimum class complexity1.00
▷ Maximum class complexity797.00
Average method complexity4.28
▷ Minimum method complexity1.00
▷ Maximum method complexity652.00
Code structure
Namespaces36
Interfaces5
Traits0
Classes192
▷ Abstract classes126.25%
▷ Concrete classes18093.75%
▷ Final classes10.56%
Methods2,117
▷ Static methods1185.57%
▷ Public methods1,83286.54%
▷ Protected methods2109.92%
▷ Private methods753.54%
Functions16
▷ Named functions16.25%
▷ Anonymous functions1593.75%
Constants180
▷ Global constants63.33%
▷ Class constants17496.67%
▷ Public constants174100.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 PNG files occupy 0.08MB with 0.03MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
vendor/dompdf/dompdf/lib/res/broken_image.png0.60KB0.47KB▼ 22.33%
core/import/modern-certificate.png31.85KB13.73KB▼ 56.90%
core/import/elegant-certificate.png48.22KB22.91KB▼ 52.49%