84% smooth-accordion

Code Review | Smooth Accordion

WordPress plugin Smooth Accordion scored84%from 54 tests.

About plugin

  • Plugin page: smooth-accordion
  • Plugin version: 2.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.8.3
  • WordPress version: 6.3.1
  • First release: Jul 22, 2014
  • Latest release: Nov 7, 2017
  • Number of updates: 26
  • Update frequency: every 46.3 days
  • Top authors: zakirbd63 (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

200+ active /5,573 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

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

This is a short check of server-side resources used by Smooth Accordion
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0342.91 ▼8.61
Dashboard /wp-admin3.32 ▲0.0250.57 ▼1.81
Posts /wp-admin/edit.php3.37 ▲0.0151.50 ▼6.21
Add New Post /wp-admin/post-new.php5.90 ▲0.0289.24 ▼19.02
Media Library /wp-admin/upload.php3.24 ▲0.0137.92 ▼4.06

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Smooth Accordion
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,899 ▲11313.86 ▼0.929.54 ▲7.6042.42 ▼5.38
Dashboard /wp-admin2,195 ▲215.59 ▼0.1795.39 ▲6.4441.13 ▲0.77
Posts /wp-admin/edit.php2,079 ▼241.98 ▼0.0337.05 ▼2.8237.13 ▲0.63
Add New Post /wp-admin/post-new.php1,526 ▼323.38 ▲0.23658.61 ▼5.5053.59 ▼1.77
Media Library /wp-admin/upload.php1,397 ▼04.20 ▲0.01101.15 ▼3.5542.82 ▼3.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
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts

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 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions 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/smooth-accordion/plugin-hook.php on line 34
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/smooth-accordion/plugin-hook.php:34

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Please fix the following attributes:
  • Screenshots: Please add images for these screenshots: #1 (Accordion in a page), #2 (Accordion shortcode button in TinyMCE editor), #3 (Color Blue), #4 (Color Pink)
You can look at the official readme.txt

smooth-accordion/plugin-hook.php 92% from 13 tests

The main file in "Smooth Accordion" v. 2.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please take the time to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("smooth-accordion.php" instead of "plugin-hook.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
Success! There were no dangerous files found in this plugin341 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript32320222
CSS113382
PHP1614437

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
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%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
2 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/js/btn.png0.65KB0.41KB▼ 37.43%
assets/img/down-arrow.png1.02KB0.25KB▼ 75.00%