84% standard-accordion

Code Review | Standard Accordion

WordPress plugin Standard Accordion scored84%from 54 tests.

About plugin

  • Plugin page: standard-accordion
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.1-6.0
  • WordPress version: 6.3.1
  • First release: Jul 11, 2022
  • Latest release: Jul 11, 2022
  • Number of updates: 3
  • Update frequency: every 0.7 days
  • Top authors: umesh84 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,086 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.06MB] [CPU: ▼3.41ms] Passed 4 tests

This is a short check of server-side resources used by Standard Accordion
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0545.13 ▲1.91
Dashboard /wp-admin3.36 ▲0.0553.31 ▲0.25
Posts /wp-admin/edit.php3.49 ▲0.1352.69 ▼1.92
Add New Post /wp-admin/post-new.php5.95 ▲0.0697.10 ▼10.34
Media Library /wp-admin/upload.php3.29 ▲0.0637.90 ▼1.63

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 24 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Standard Accordion
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,995 ▲23421.14 ▲6.766.67 ▲4.8444.49 ▲3.59
Dashboard /wp-admin2,293 ▲11910.54 ▲4.98226.75 ▲129.7338.07 ▼6.14
Posts /wp-admin/edit.php2,191 ▲9110.46 ▲8.4381.53 ▲45.8033.03 ▼11.39
Add New Post /wp-admin/post-new.php6,200 ▲4,67418.86 ▲1.36719.90 ▲44.6837.02 ▼20.62
Media Library /wp-admin/upload.php1,516 ▲11610.96 ▲6.80143.58 ▲21.0744.12 ▼5.03

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded

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
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
  • 2× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/standard-accordion/admin/partials/standard-accordion-admin-display.php
    • > /wp-content/plugins/standard-accordion/public/partials/standard-accordion-public-display.php

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
1 plugin tags: accordion

standard-accordion/standard-accordion.php Passed 13 tests

The primary PHP file in "Standard Accordion" version 1.0.0 is used by WordPress to initiate all plugin functionality
96 characters long description:
This is a short description of what the plugin does. It's displayed in the WordPress admin area.

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 plugin643 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript428133373
PHP12120537170
CSS238100

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.08
Average class complexity1.43
▷ Minimum class complexity1.00
▷ Maximum class complexity3.00
Average method complexity1.12
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods24
▷ Static methods28.33%
▷ Public methods1979.17%
▷ Protected methods00.00%
▷ Private methods520.83%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There are no PNG files in this plugin