78% dg-accordian

Code Review | DG Accordian

WordPress plugin DG Accordian scored 78% from 54 tests.

About plugin

  • Plugin page: dg-accordian
  • Plugin version: 1.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.7.5
  • WordPress version: 6.3.1
  • First release: May 31, 2017
  • Latest release: Jun 5, 2017
  • Number of updates: 14
  • Update frequency: every 0.4 days
  • Top authors: developerdinesh1 (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

60+ active / 2,426 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.02MB] [CPU: ▼8.42ms] Passed 4 tests

Analyzing server-side resources used by DG Accordian
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0342.05 ▼0.19
Dashboard /wp-admin3.33 ▲0.0248.11 ▼7.11
Posts /wp-admin/edit.php3.38 ▲0.0248.69 ▲0.54
Add New Post /wp-admin/post-new.php5.93 ▲0.0484.18 ▼21.86
Media Library /wp-admin/upload.php3.25 ▲0.0233.79 ▼4.53

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 29 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts
db_upgraded
widget_dg_accordian_widget
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by DG Accordian
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,922 ▲18714.91 ▲0.6315.51 ▲13.7137.42 ▼6.26
Dashboard /wp-admin2,204 ▲165.85 ▲0.96102.24 ▼14.7938.37 ▼5.08
Posts /wp-admin/edit.php2,090 ▲12.04 ▲0.0535.64 ▼1.6031.48 ▼0.80
Add New Post /wp-admin/post-new.php1,518 ▼1923.28 ▲0.13611.27 ▲29.5750.54 ▼2.77
Media Library /wp-admin/upload.php1,392 ▲44.26 ▲0.0795.73 ▼17.3441.42 ▼7.41

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

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

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
Even though everything seems fine, this is not an exhaustive test

SRP 0% 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 take a closer look at the following
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/dg-accordian/admin/partials/dg-accordian-admin-display.php
  • 4× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/dg-accordian/public/partials/dg-accordian-public-display.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/dg-accordian/includes/class-dg-accordian-widget.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/dg-accordian/admin/class-dg-accordian-ajax.php:28
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/dg-accordian/includes/class-wp-widget-text.php:17

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration 97% 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:
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === dg-accordian === )
The official readme.txt is a good inspiration

dg-accordian/dg-accordian.php Passed 13 tests

This is the main PHP file of "DG Accordian" version 1.1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
25 characters long description:
This is accordian plugin.

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 plugin22,373 lines of code in 23 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript45,1673,95620,716
CSS341561,222
PHP16194711435

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity4.18
▷ Minimum class complexity1.00
▷ Maximum class complexity18.00
Average method complexity1.78
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes11
▷ Abstract classes00.00%
▷ Concrete classes11100.00%
▷ Final classes00.00%
Methods45
▷ Static methods24.44%
▷ Public methods3986.67%
▷ Protected methods00.00%
▷ Private methods613.33%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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