78% searchable-accordion

Code Review | Searchable Accordion

WordPress plugin Searchable Accordion scored78%from 54 tests.

About plugin

  • Plugin page: searchable-accordion
  • Plugin version: 1.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.8.3
  • WordPress version: 6.3.1
  • First release: Nov 5, 2017
  • Latest release: Nov 13, 2017
  • Number of updates: 29
  • Update frequency: every 0.3 days
  • Top authors: nafsinvk (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /813 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.06MB] [CPU: ▼8.64ms] Passed 4 tests

Server-side resources used by Searchable Accordion
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0638.37 ▲0.11
Dashboard /wp-admin3.37 ▲0.0243.86 ▼18.44
Posts /wp-admin/edit.php3.48 ▲0.1247.04 ▼2.10
Add New Post /wp-admin/post-new.php5.97 ▲0.0881.92 ▼14.13
Media Library /wp-admin/upload.php3.29 ▲0.0638.01 ▲3.85

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 32 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for Searchable Accordion
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,915 ▲14414.03 ▼0.426.14 ▲4.3339.03 ▼1.59
Dashboard /wp-admin2,212 ▲245.79 ▼0.09111.35 ▲3.7239.47 ▼2.49
Posts /wp-admin/edit.php2,095 ▲62.05 ▲0.0139.91 ▲3.6234.68 ▲1.18
Add New Post /wp-admin/post-new.php1,426 ▼10717.33 ▼5.78587.63 ▼91.7467.90 ▲12.78
Media Library /wp-admin/upload.php1,397 ▲64.16 ▼0.0499.68 ▲3.3942.44 ▲0.52

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 0% 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
Please take a closer look at the following
  • 2× PHP files output text when accessed directly:
    • > /wp-content/plugins/searchable-accordion/public/partials/searchable_accrodion-public-display.php
    • > /wp-content/plugins/searchable-accordion/admin/partials/searchable_accrodion-admin-display.php
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/searchable-accordion/tinymce-custom-class-master/tinymce-custom-class.php:19

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 90% 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
Attributes that require attention:
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === searchable-accordion === )
The official readme.txt is a good inspiration

searchable-accordion/searchable_accrodion.php 85% from 13 tests

The entry point to "Searchable Accordion" version 1.1.0 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("searchable-accordion.php" instead of "searchable_accrodion.php")
  • Text Domain: The text domain name should consist of only dashes and lowercase characters

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin608 lines of code in 21 files:
LanguageFilesBlank linesComment linesLines of code
PHP13141574245
CSS4108188
JavaScript31337173
Markdown1002

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.15
Average class complexity2.38
▷ Minimum class complexity1.00
▷ Maximum class complexity9.00
Average method complexity1.37
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods30
▷ Static methods26.67%
▷ Public methods2583.33%
▷ Protected methods00.00%
▷ Private methods516.67%
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

All PNG images should be compressed to minimize bandwidth usage for end users
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
tinymce-custom-class-master/icon.png0.39KB0.32KB▼ 17.75%