83% ultimate-accordion

Code Review | Ultimate Accordion

WordPress plugin Ultimate Accordion scored 83% from 54 tests.

About plugin

  • Plugin page: ultimate-accordion
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4.2-4.4.2
  • WordPress version: 6.3.1
  • First release: Mar 12, 2016
  • Latest release: Mar 12, 2016
  • Number of updates: 5
  • Update frequency: every 0.4 days
  • Top authors: Md. Shiddikur Rahman (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active / 1,971 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.07MB] [CPU: ▼1.28ms] Passed 4 tests

Analyzing server-side resources used by Ultimate Accordion
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0841.71 ▲5.71
Dashboard /wp-admin3.38 ▲0.0844.45 ▼3.43
Posts /wp-admin/edit.php3.43 ▲0.0745.78 ▼4.58
Add New Post /wp-admin/post-new.php5.96 ▲0.0790.70 ▼0.17
Media Library /wp-admin/upload.php3.30 ▲0.0735.23 ▲3.08
Accordion Item Category /wp-admin/edit-tags.php?taxonomy=accordion_cat&post_type=accordion-item3.3033.29
All Accordion Items /wp-admin/edit.php?post_type=accordion-item3.3433.53
Add New Accordion Item /wp-admin/post-new.php?post_type=accordion-item3.4348.34

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for Ultimate Accordion
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,917 ▲18213.56 ▼0.879.09 ▲7.4144.42 ▲1.24
Dashboard /wp-admin2,237 ▲495.82 ▲0.9199.20 ▼0.2939.84 ▼3.15
Posts /wp-admin/edit.php2,120 ▲312.02 ▲0.0134.05 ▼7.3733.47 ▼2.34
Add New Post /wp-admin/post-new.php1,568 ▲3318.17 ▼4.95603.24 ▼87.7648.95 ▼4.29
Media Library /wp-admin/upload.php1,419 ▲314.21 ▲0.0494.61 ▼13.9543.64 ▼1.19
Accordion Item Category /wp-admin/edit-tags.php?taxonomy=accordion_cat&post_type=accordion-item1,2902.1425.3329.31
All Accordion Items /wp-admin/edit.php?post_type=accordion-item1,1011.9530.0730.34
Add New Accordion Item /wp-admin/post-new.php?post_type=accordion-item2,2847.69162.2863.34

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
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

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
Almost there! Just fix the following items
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Warning
      Use of undefined constant WP_PLUGIN_URL - assumed 'WP_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/ultimate-accordion/ultimate_accordion_main.php on line 11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/ultimate-accordion/ultimate_accordion_main.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 81% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that require attention:
  • Screenshots: Please add images for these screenshots: #1 (Demo Screenshots 1.), #2 (Demo Screenshots 2.), #3 (admin panel plugin option.)
  • Contributors: Contributors not specified
  • Tags: Please reduce the number of tags, currently 35 tag instead of maximum 10
You can take inspiration from this readme.txt

ultimate-accordion/ultimate_accordion_main.php 85% from 13 tests

"Ultimate Accordion" version 1.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 155 characters long)
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("ultimate-accordion.php" instead of "ultimate_accordion_main.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
Success! There were no dangerous files found in this plugin683 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
CSS1814361
PHP11944313
JavaScript1019

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.08
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%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
There are no PNG files in this plugin