77% expandcollapse-funk

Code Review | Expand + Collapse Funk

WordPress plugin Expand + Collapse Funk scored 77% from 54 tests.

About plugin

  • Plugin page: expandcollapse-funk
  • Plugin version: 2.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-3.9.1
  • WordPress version: 6.3.1
  • First release: Nov 24, 2013
  • Latest release: Oct 15, 2014
  • Number of updates: 58
  • Update frequency: every 5.6 days
  • Top authors: eherman24 (100%)

Code review

54 tests

User reviews

16 reviews

Install metrics

1,000+ active / 26,879 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: ▼6.71ms] Passed 4 tests

Server-side resources used by Expand + Collapse Funk
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0237.35 ▼4.07
Dashboard /wp-admin3.32 ▲0.0244.54 ▼3.70
Posts /wp-admin/edit.php3.37 ▲0.0246.32 ▼3.90
Add New Post /wp-admin/post-new.php5.91 ▲0.0283.35 ▼15.16
Media Library /wp-admin/upload.php3.25 ▲0.0236.47 ▲0.80

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 10 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
theysaidso_admin_options
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Expand + Collapse Funk
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,829 ▲9413.38 ▼1.002.10 ▲0.0139.02 ▼10.87
Dashboard /wp-admin2,209 ▲184.85 ▼0.07103.36 ▲3.7239.46 ▼4.16
Posts /wp-admin/edit.php2,089 ▼32.00 ▼0.0439.32 ▼1.0835.38 ▼0.29
Add New Post /wp-admin/post-new.php1,536 ▲823.62 ▲5.24641.83 ▲2.7963.31 ▲6.66
Media Library /wp-admin/upload.php1,388 ▼04.25 ▲0.1193.00 ▼8.6340.84 ▼2.63

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 50% 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)
Everything seems fine, however this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The following issues need your attention
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/expandcollapse-funk/expand-collapse-funk-modal.php
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/expandcollapse-funk/expand-collapse-funk.php:100

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need to be fixed:
  • Tags: Please reduce the number of tags, currently 24 tag instead of maximum 10
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === expandcollapse-funk === )
You can take inspiration from this readme.txt

expandcollapse-funk/expand-collapse-funk.php 85% from 13 tests

The primary PHP file in "Expand + Collapse Funk" version 2.2 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 154 characters long)
  • Main file name: Name the main plugin file the same as the plugin slug ("expandcollapse-funk.php" instead of "expand-collapse-funk.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 detected501 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP24054477
JavaScript14112
SVG10012

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No cyclomatic complexity issues were detected for 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%
Functions5
▷ Named functions5100.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
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
toggle_expand.png1.05KB1.32KB0.00%