84% we-divi-modules

Code Review | We Divi Modules

WordPress plugin We Divi Modules scored84%from 54 tests.

About plugin

  • Plugin page: we-divi-modules
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-5.5
  • WordPress version: 6.3.1
  • First release: Aug 16, 2020
  • Latest release: Aug 16, 2020
  • Number of updates: 3
  • Update frequency: every 0.7 days
  • Top authors: mdtanjid (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /522 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼3.70ms] Passed 4 tests

Server-side resources used by We Divi Modules
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0140.30 ▼1.25
Dashboard /wp-admin3.31 ▲0.0047.30 ▼4.12
Posts /wp-admin/edit.php3.36 ▲0.0046.44 ▼7.18
Add New Post /wp-admin/post-new.php5.89 ▲0.0085.14 ▼2.26
Media Library /wp-admin/upload.php3.23 ▲0.0033.35 ▼0.18

Server storage [IO: ▲2.65MB] [DB: ▲0.07MB] Passed 3 tests

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 29 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
db_upgraded
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for We Divi Modules
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,802 ▲6713.17 ▼1.221.86 ▲0.0142.82 ▼6.44
Dashboard /wp-admin2,206 ▲184.85 ▼1.1599.87 ▼8.9139.41 ▼5.31
Posts /wp-admin/edit.php2,089 ▲32.06 ▲0.0536.71 ▲0.8333.25 ▼2.28
Add New Post /wp-admin/post-new.php1,533 ▲1423.37 ▲0.14668.09 ▲18.5751.30 ▼7.32
Media Library /wp-admin/upload.php1,388 ▼04.24 ▲0.0396.06 ▲0.9541.76 ▲1.95

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
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
Almost there! Just fix the following items
  • 4× 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/we-divi-modules/we-divi-modules.php:38
    • > PHP Fatal error
      Uncaught Error: Class 'ET_Builder_Module' not found in wp-content/plugins/we-divi-modules/includes/modules/weSiteLinksItem/weSiteLinksItem.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'DiviExtension' not found in wp-content/plugins/we-divi-modules/includes/WeDiviModules.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'ET_Builder_Module' not found in wp-content/plugins/we-divi-modules/includes/modules/weSiteLinks/weSiteLinks.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need to be fixed: The official readme.txt might help

we-divi-modules/we-divi-modules.php 92% from 13 tests

The main PHP script in "We Divi Modules" version 1.0.1 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected9,696 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
SVG30128,777
PHP53761656
PO File1115118258
CSS3003
JavaScript2002

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity8.67
▷ Minimum class complexity1.00
▷ Maximum class complexity23.00
Average method complexity2.92
▷ Minimum method complexity1.00
▷ Maximum method complexity23.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods12
▷ Static methods00.00%
▷ Public methods1191.67%
▷ Protected methods18.33%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG images were found in this plugin