84% cb-responsive-jquery-accordion

Code Review | CB Responsive jQuery Accordion

WordPress plugin CB Responsive jQuery Accordion scored84%from 54 tests.

About plugin

  • Plugin page: cb-responsive-jqu...
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.4
  • WordPress version: 6.3.1
  • First release: Sep 2, 2015
  • Latest release: Apr 26, 2020
  • Number of updates: 18
  • Update frequency: every 94.3 days
  • Top authors: hmbashar (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

10+ active /1,899 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.02MB] [CPU: ▼7.74ms] Passed 4 tests

An overview of server-side resources used by CB Responsive jQuery Accordion
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0440.59 ▲0.65
Dashboard /wp-admin3.34 ▼0.0147.87 ▼13.73
Posts /wp-admin/edit.php3.39 ▲0.0346.73 ▼3.46
Add New Post /wp-admin/post-new.php5.92 ▲0.0484.22 ▼11.84
Media Library /wp-admin/upload.php3.26 ▲0.0336.55 ▼1.91
FAQs /wp-admin/edit.php?post_type=cb_faqs3.3036.18
Add New FAQ /wp-admin/post-new.php?post_type=cb_faqs3.3848.07

Server storage [IO: ▲0.01MB] [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: 5 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
db_upgraded
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for CB Responsive jQuery Accordion
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,931 ▲17013.40 ▼0.969.76 ▲8.0947.05 ▲8.44
Dashboard /wp-admin2,225 ▲515.58 ▼0.0283.35 ▼5.8839.25 ▼3.65
Posts /wp-admin/edit.php2,127 ▲302.02 ▲0.0736.45 ▼1.5933.01 ▼4.06
Add New Post /wp-admin/post-new.php1,551 ▲2323.23 ▲0.20649.51 ▼11.0154.05 ▼5.90
Media Library /wp-admin/upload.php1,430 ▲274.19 ▲0.0195.94 ▼1.6043.15 ▼1.84
FAQs /wp-admin/edit.php?post_type=cb_faqs1,1001.9630.4229.70
Add New FAQ /wp-admin/post-new.php?post_type=cb_faqs2,2537.79166.9762.35

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/cb-responsive-jquery-accordion/inc/cb-faq-post.php:27
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/cb-responsive-jquery-accordion/index.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

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
6 plugin tags: responsive accordion, wordpress responsive accordion with faq, cb responsive jquery accordion, wordpress jquery faq plugin, accordion...

cb-responsive-jquery-accordion/index.php 92% from 13 tests

The main PHP file in "CB Responsive jQuery Accordion" ver. 1.2 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("cb-responsive-jquery-accordion.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected136 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP2321278
CSS13046
JavaScript19712

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.04
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%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There are no PNG files in this plugin