84% components-for-learning

Code Review | Components for Learning

WordPress plugin Components for Learning scored84%from 54 tests.

About plugin

  • Plugin page: components-for-le...
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.1-6.1
  • WordPress version: 6.3.1
  • First release: Jan 18, 2023
  • Latest release: Jan 18, 2023
  • Number of updates: 6
  • Update frequency: every 0.3 days
  • Top authors: rogersegu (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /154 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼0.12MB] [CPU: ▼11.09ms] Passed 4 tests

This is a short check of server-side resources used by Components for Learning
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.73 ▲0.2741.07 ▲0.39
Dashboard /wp-admin3.45 ▲0.1449.79 ▼6.21
Posts /wp-admin/edit.php3.50 ▲0.1452.62 ▲2.08
Add New Post /wp-admin/post-new.php4.96 ▼0.9359.56 ▼40.60
Media Library /wp-admin/upload.php3.37 ▲0.1440.89 ▲5.61

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Components for Learning
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,854 ▲9313.19 ▼1.105.66 ▲3.6938.26 ▼6.06
Dashboard /wp-admin2,221 ▲214.85 ▼0.17105.02 ▼11.8239.32 ▼4.96
Posts /wp-admin/edit.php2,100 ▼01.99 ▼0.0339.75 ▲2.2834.39 ▼0.82
Add New Post /wp-admin/post-new.php6,450 ▲4,90529.04 ▲5.87960.22 ▲309.3938.62 ▼18.24
Media Library /wp-admin/upload.php1,394 ▼64.25 ▲0.0398.64 ▼11.8143.61 ▲0.65

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Almost there! Just fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/components-for-learning/components-for-learning.php:30

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 Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
4 plugin tags: gutenberg, blocks, learning, lms

components-for-learning/components-for-learning.php Passed 13 tests

The main file in "Components for Learning" v. 1.0.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
111 characters long description:
A collection of semantic visual designed for learning contents, aimed to reduce the learners’ cognitive load.

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
Everything looks great! No dangerous files found in this plugin5,542 lines of code in 91 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript157351,4104,073
CSS3046120865
JSON1500501
PHP3186240103

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.02
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions17
▷ Named functions1694.12%
▷ Anonymous functions15.88%
Constants0
▷ Global constants00.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 files were detected