10% eit-accordion

Code Review | EIT Accordion

WordPress plugin EIT Accordion scored10%from 54 tests.

About plugin

  • Plugin page: eit-accordion
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-3.5.2
  • WordPress version: 6.3.1
  • First release: Nov 30, 2014
  • Latest release: Nov 30, 2014
  • Number of updates: 3
  • Update frequency: every 1.0 days
  • Top authors: exclusiveitech (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /730 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
It is recommended to fix the following installer errors
  • The plugin cannot be installed
    • > Warning in wp-content/plugins/eit-accordion/eit-accordion.php+23
    Use of undefined constant eit_ACCORDION_PLUGIN_PATH - assumed 'eit_ACCORDION_PLUGIN_PATH' (this will throw an Error in a future version of PHP)

Server metrics [RAM: ▼1.96MB] [CPU: ▼50.18ms] Passed 4 tests

A check of server-side resources used by EIT Accordion
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.03 ▼1.433.84 ▼35.86
Dashboard /wp-admin2.05 ▼1.266.00 ▼40.69
Posts /wp-admin/edit.php2.05 ▼1.316.10 ▼39.01
Add New Post /wp-admin/post-new.php2.05 ▼3.845.50 ▼85.17
Media Library /wp-admin/upload.php2.05 ▼1.186.54 ▼28.99

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

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

Browser metrics Passed 4 tests

EIT Accordion: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,897 ▲16213.93 ▼0.468.02 ▲6.2336.36 ▼7.63
Dashboard /wp-admin2,212 ▲214.89 ▼0.02111.20 ▲6.1339.44 ▼5.23
Posts /wp-admin/edit.php2,095 ▲61.98 ▼0.0246.76 ▲8.3237.37 ▲3.70
Add New Post /wp-admin/post-new.php1,520 ▼2722.97 ▲4.88619.18 ▼13.2755.95 ▲1.55
Media Library /wp-admin/upload.php1,391 ▲34.18 ▼0.0797.10 ▼5.0542.33 ▼0.10

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • The plugin did not uninstall gracefully
    • > Warning in wp-content/plugins/eit-accordion/eit-accordion.php+23
    Use of undefined constant eit_ACCORDION_PLUGIN_PATH - assumed 'eit_ACCORDION_PLUGIN_PATH' (this will throw an Error in a future version of PHP)
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, 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 Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/eit-accordion/eit-accordion.php:13
    • > 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/eit-accordion/eit-accordion.php on line 13

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 93% 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 your attention:
  • Screenshots: Screenshot #1 (eit accordion in a post.) image missing
  • Donate link: Please fix this invalid url: ""
Please take inspiration from this readme.txt

eit-accordion/eit-accordion.php Passed 13 tests

The primary PHP file in "EIT Accordion" version 1.0 is used by WordPress to initiate all plugin functionality
80 characters long description:
This plugin will add an expand collapse accordion feature inside a post or page.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Success! There were no dangerous files found in this plugin456 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript39368410
PHP1231534
CSS12012

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity issues
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
3 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
css/minus_icon.png1.02KB0.15KB▼ 84.96%
js/faq.png1.09KB0.25KB▼ 76.68%
css/plus_icon.png1.08KB0.19KB▼ 82.22%