83% my-wp-accordion

Code Review | WP Accordion

WordPress plugin WP Accordion scored 83% from 54 tests.

About plugin

  • Plugin page: my-wp-accordion
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.0.1
  • WordPress version: 6.3.1
  • First release: Sep 17, 2015
  • Latest release: Feb 20, 2017
  • Number of updates: 6
  • Update frequency: every 87.0 days
  • Top authors: Sohelwpexpert (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 994 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

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

An overview of server-side resources used by WP Accordion
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0148.66 ▲5.76
Dashboard /wp-admin3.31 ▲0.0066.89 ▲10.93
Posts /wp-admin/edit.php3.36 ▲0.0053.73 ▼2.29
Add New Post /wp-admin/post-new.php5.89 ▲0.0199.43 ▲5.15
Media Library /wp-admin/upload.php3.23 ▲0.0036.50 ▼1.73

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 12 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for WP Accordion
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,885 ▲9613.59 ▲0.339.39 ▲4.4542.97 ▲2.29
Dashboard /wp-admin2,206 ▼04.85 ▼1.01117.29 ▲9.3045.32 ▲5.29
Posts /wp-admin/edit.php2,092 ▲32.06 ▲0.0441.50 ▲2.2036.61 ▲0.75
Add New Post /wp-admin/post-new.php1,542 ▲823.38 ▼0.02732.84 ▼7.5553.25 ▼11.35
Media Library /wp-admin/upload.php1,388 ▲34.19 ▲0.03101.60 ▼9.2844.01 ▼5.59

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
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
Please fix the following
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/my-wp-accordion/plugin-hook.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/my-wp-accordion/plugin-hook.php on line 13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 81% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Please fix the following attributes:
  • Screenshots: Screenshot #1 (WP accordion in a post.) image missing
  • Screenshots: Please describe screenshot #0 in my-wp-accordion/assets to your readme.txt
  • Donate link: Please fix this invalid URI: ""
The official readme.txt might help

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

The main PHP file in "WP Accordion" ver. 1.1 adds more information about the plugin and also serves as the entry point for this 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 ("my-wp-accordion.php" instead of "plugin-hook.php")

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
Good job! No executable or dangerous file extensions detected127 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript2193255
PHP1251742
CSS2191430

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
All good! No complexity issues found
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

PNG files should be compressed to save space and minimize bandwidth usage
6 PNG files occupy 0.03MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot.png22.47KB10.59KB▼ 52.87%
css/plus_icon.png1.08KB0.19KB▼ 82.22%
js/faq.png1.09KB0.25KB▼ 76.68%
css/minus_icon.png1.02KB0.15KB▼ 84.96%
images/title-left1.png0.13KB0.10KB▼ 22.39%