89% wp-courseware-addon-for-restrict-content-pro

Code Review | WP Courseware addon for Restrict Content Pro

WordPress plugin WP Courseware addon for Restrict Content Pro scored89%from 54 tests.

About plugin

  • Plugin page: wp-courseware-add...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.1.1
  • WordPress version: 6.3.1
  • First release: Apr 28, 2020
  • Latest release: Dec 9, 2022
  • Number of updates: 9
  • Update frequency: every 133.4 days
  • Top authors: flyplugins (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /679 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.09MB] [CPU: ▼2.68ms] Passed 4 tests

This is a short check of server-side resources used by WP Courseware addon for Restrict Content Pro
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.0939.30 ▼3.14
Dashboard /wp-admin3.40 ▲0.1050.30 ▼3.11
Posts /wp-admin/edit.php3.51 ▲0.1654.46 ▲2.91
Add New Post /wp-admin/post-new.php5.98 ▲0.0987.51 ▼3.85
Media Library /wp-admin/upload.php3.32 ▲0.0937.93 ▼0.60

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for WP Courseware addon for Restrict Content Pro
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,820 ▲5913.58 ▼0.671.55 ▼0.1442.85 ▲2.90
Dashboard /wp-admin2,223 ▲204.85 ▼0.04111.05 ▲5.3643.49 ▼1.15
Posts /wp-admin/edit.php2,108 ▲82.04 ▼0.0140.55 ▲3.7439.77 ▲8.75
Add New Post /wp-admin/post-new.php1,554 ▲2823.28 ▲5.53677.91 ▼27.3360.28 ▼9.50
Media Library /wp-admin/upload.php1,399 ▼14.19 ▼0.01108.76 ▲1.2541.41 ▼6.51

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not 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
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
2 plugin tags: learning management system, selling online courses

wp-courseware-addon-for-restrict-content-pro/wp-courseware-restrict-content-pro.php 77% from 13 tests

The main file in "WP Courseware addon for Restrict Content Pro" v. 1.0.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please make the necessary changes and fix the following:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Domain Path: The domain path folder does not exist ("/languages")
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("wp-courseware-addon-for-restrict-content-pro.php" instead of "wp-courseware-restrict-content-pro.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin518 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP6211371518

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
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 complexity14.00
▷ Minimum class complexity1.00
▷ Maximum class complexity30.00
Average method complexity2.73
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes125.00%
Methods30
▷ Static methods13.33%
▷ Public methods2170.00%
▷ Protected methods723.33%
▷ Private methods26.67%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG images were found in this plugin