84% lc-widget-modules

Code Review | LC Widget Modules

WordPress plugin LC Widget Modules scored84%from 54 tests.

About plugin

  • Plugin page: lc-widget-modules
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0.1-5.7.1
  • WordPress version: 6.3.1
  • First release: Apr 20, 2021
  • Latest release: May 14, 2021
  • Number of updates: 3
  • Update frequency: every 8.3 days
  • Top authors: jamesdlow (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /387 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.01MB] [CPU: ▼3.31ms] Passed 4 tests

Server-side resources used by LC Widget Modules
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0143.20 ▼1.14
Dashboard /wp-admin3.31 ▲0.0151.10 ▼0.85
Posts /wp-admin/edit.php3.36 ▲0.0153.36 ▲1.64
Add New Post /wp-admin/post-new.php5.89 ▲0.0191.22 ▼12.32
Media Library /wp-admin/upload.php3.23 ▲0.0138.25 ▲1.07

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
can_compress_scripts
db_upgraded
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for LC Widget Modules
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲2913.53 ▼1.111.79 ▼0.3543.44 ▼5.17
Dashboard /wp-admin2,206 ▲155.88 ▼0.02101.80 ▼0.9137.27 ▼5.61
Posts /wp-admin/edit.php2,092 ▲31.98 ▼0.0842.20 ▼0.0534.44 ▼2.98
Add New Post /wp-admin/post-new.php1,514 ▼2917.48 ▼0.74684.85 ▲15.6554.41 ▲4.84
Media Library /wp-admin/upload.php1,388 ▲64.31 ▲0.1196.85 ▼11.0444.85 ▼3.45

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 75% 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 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
Please fix the following
  • 3× 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/lc-widget-modules/lc-widget-modules-plugin.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'DSLC_Posts' not found in wp-content/plugins/lc-widget-modules/lc-widget-modules-mods.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'DSLC_Module' not found in wp-content/plugins/lc-widget-modules/lc-widget-modules.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% 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
5 plugin tags: modules, widgets, live, visual, composer

lc-widget-modules/lc-widget-modules-plugin.php 92% from 13 tests

The entry point to "LC Widget Modules" version 1.0.1 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("lc-widget-modules.php" instead of "lc-widget-modules-plugin.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected130 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP3714130

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity4.25
▷ Minimum class complexity2.00
▷ Maximum class complexity9.00
Average method complexity1.76
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes125.00%
▷ Concrete classes375.00%
▷ Final classes00.00%
Methods17
▷ Static methods847.06%
▷ Public methods17100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
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
There are no PNG files in this plugin