83% jb-accordion

Code Review | JB Accordion

WordPress plugin JB Accordion scored83%from 54 tests.

About plugin

  • Plugin page: jb-accordion
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.2.2
  • WordPress version: 6.3.1
  • First release: May 23, 2015
  • Latest release: May 23, 2015
  • Number of updates: 9
  • Update frequency: every 0.2 days
  • Top authors: jobair (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /1,449 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.01MB] [CPU: ▼3.36ms] Passed 4 tests

Server-side resources used by JB Accordion
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0141.40 ▼2.81
Dashboard /wp-admin3.32 ▲0.0156.13 ▲2.73
Posts /wp-admin/edit.php3.37 ▲0.0150.55 ▲0.29
Add New Post /wp-admin/post-new.php5.90 ▲0.0187.82 ▼13.66
Media Library /wp-admin/upload.php3.24 ▲0.0139.90 ▲3.05

Server storage [IO: ▲0.69MB] [DB: ▲0.00MB] 67% from 3 tests

How much does this plugin use your filesystem and database?
Please try to fix the following items
  • You have illegally modified 1 file (4.00KB) outside of "wp-content/plugins/jb-accordion/" and "wp-content/uploads/"
    • (new file) wp-content/mgd_mirror/mgd_maximinodotpy-gitdown-test-repository
Filesystem: 11 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

JB Accordion: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,918 ▲15713.56 ▼1.248.68 ▲6.9443.35 ▲1.54
Dashboard /wp-admin2,226 ▲205.92 ▲0.0299.40 ▼4.4538.82 ▼7.99
Posts /wp-admin/edit.php2,108 ▲82.07 ▲0.0538.80 ▼2.9834.40 ▼2.46
Add New Post /wp-admin/post-new.php1,534 ▲823.33 ▲5.84657.51 ▼2.6456.91 ▼3.37
Media Library /wp-admin/upload.php1,405 ▲24.24 ▲0.0398.11 ▼19.2640.41 ▼10.65

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
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts

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 | 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 trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/jb-accordion/jb-accordion-hook.php:17

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Please fix the following attributes:
  • Contributors: The plugin contributors field is missing
  • Screenshots: A description for screenshot #0 is missing in jb-accordion/assets to your readme.txt
The official readme.txt is a good inspiration

jb-accordion/jb-accordion-hook.php 92% from 13 tests

"JB Accordion" version 1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("jb-accordion.php" instead of "jb-accordion-hook.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected3,626 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
CSS3425543,032
SVG100520
PHP19949
JavaScript10025

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.00
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
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

All PNG images should be compressed to minimize bandwidth usage for end users
PNG images were not found in this plugin