78% comments-wpdesign

Code Review | Comments - wpDesign

WordPress plugin Comments - wpDesign scored78%from 54 tests.

About plugin

  • Plugin page: comments-wpdesign
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: May 12, 2020
  • Latest release: Jun 3, 2021
  • Number of updates: 6
  • Update frequency: every 65.5 days
  • Top authors: joysaha7302 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /438 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼9.98ms] Passed 4 tests

Server-side resources used by Comments - wpDesign
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0438.73 ▼2.96
Dashboard /wp-admin3.34 ▼0.0044.91 ▼12.64
Posts /wp-admin/edit.php3.46 ▲0.1051.90 ▲1.58
Add New Post /wp-admin/post-new.php5.92 ▲0.0480.71 ▼24.52
Media Library /wp-admin/upload.php3.27 ▲0.0434.34 ▲0.19

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 57 new files
Database: no new tables, 9 new options
New WordPress options
cwpd_wp_design
widget_recent-posts
cwpd_setting_data
widget_recent-comments
theysaidso_admin_options
cwpd_version
can_compress_scripts
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Comments - wpDesign
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,898 ▲15213.75 ▼0.486.92 ▲4.9143.57 ▲0.25
Dashboard /wp-admin2,218 ▲305.88 ▲0.00105.15 ▲5.1139.76 ▼2.39
Posts /wp-admin/edit.php2,101 ▲122.02 ▲0.0140.02 ▼1.8037.53 ▲2.47
Add New Post /wp-admin/post-new.php1,552 ▲3318.16 ▼5.04604.04 ▼22.8067.31 ▲15.32
Media Library /wp-admin/upload.php1,403 ▲124.29 ▲0.0595.12 ▼3.9742.11 ▼3.60

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

SRP 0% from 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
Please fix the following
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/comments-wpdesign/wpDesign.php
  • 3× 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/comments-wpdesign/wps/Helper/CWPDCommonHelper.php:49
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/comments-wpdesign/wps/Helper/CWPDCommonHelper.php:49
    • > PHP Fatal error
      Uncaught Error: Call to undefined function do_action() in wp-content/plugins/comments-wpdesign/views/setting_view.php:23

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need to be fixed:
  • Requires at least: The plugin version is formatted incorrectly
The official readme.txt is a good inspiration

comments-wpdesign/wpDesign.php 85% from 13 tests

The main PHP file in "Comments - wpDesign" ver. 1.0.0 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("comments-wpdesign.php" instead of "wpDesign.php")
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin10,102 lines of code in 39 files:
LanguageFilesBlank linesComment linesLines of code
CSS7558305,702
SVG1002,671
PHP232054231,342
JavaScript41650217
JSON300156
Sass12014

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity15.69
▷ Minimum class complexity1.00
▷ Maximum class complexity66.00
Average method complexity3.98
▷ Minimum method complexity1.00
▷ Maximum method complexity62.00
Code structure
Namespaces7
Interfaces0
Traits0
Classes13
▷ Abstract classes00.00%
▷ Concrete classes13100.00%
▷ Final classes17.69%
Methods65
▷ Static methods1523.08%
▷ Public methods6295.38%
▷ Protected methods00.00%
▷ Private methods34.62%
Functions16
▷ Named functions1593.75%
▷ Anonymous functions16.25%
Constants7
▷ Global constants7100.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