83% modern-accordion-shortcode

Code Review | Modern Accordion Shortcode

WordPress plugin Modern Accordion Shortcode scored83%from 54 tests.

About plugin

  • Plugin page: modern-accordion-...
  • Plugin version: 0.7
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5+
  • WordPress version: 6.3.1
  • First release: Sep 29, 2014
  • Latest release: Oct 29, 2014
  • Number of updates: 23
  • Update frequency: every 1.4 days
  • Top authors: GnuandYou (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /1,632 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.02MB] [CPU: ▼8.96ms] Passed 4 tests

Analyzing server-side resources used by Modern Accordion Shortcode
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0337.95 ▼1.58
Dashboard /wp-admin3.33 ▼0.0148.14 ▼17.85
Posts /wp-admin/edit.php3.38 ▲0.0351.25 ▲0.73
Add New Post /wp-admin/post-new.php5.91 ▲0.0387.56 ▼17.15
Media Library /wp-admin/upload.php3.25 ▲0.0336.18 ▲1.13

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
db_upgraded
widget_recent-posts
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Modern Accordion Shortcode
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲6014.48 ▲0.181.78 ▼0.2841.57 ▼0.14
Dashboard /wp-admin2,208 ▲234.89 ▼0.93115.13 ▲9.9743.53 ▲0.29
Posts /wp-admin/edit.php2,091 ▼11.98 ▼0.0740.88 ▲3.9534.48 ▼1.30
Add New Post /wp-admin/post-new.php1,539 ▲1618.22 ▼5.00634.94 ▼58.6252.32 ▼12.15
Media Library /wp-admin/upload.php1,393 ▲54.22 ▼0.0198.77 ▼2.2541.68 ▼5.18

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 75% 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)
The smoke test was a success, however most plugin functionality was not tested

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
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function remove_filter() in wp-content/plugins/modern-accordion-shortcode/accordion-shortcode.php:204

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 88% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Please fix the following attributes:
  • Contributors: Plugin contributors not specified
  • Tested up to: Invalid version format
You can take inspiration from this readme.txt

modern-accordion-shortcode/accordion-shortcode.php 92% from 13 tests

This is the main PHP file of "Modern Accordion Shortcode" version 0.7, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("modern-accordion-shortcode.php" instead of "accordion-shortcode.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Success! There were no dangerous files found in this plugin197 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP13464108
LESS118567
SVG10016
JavaScript1005
CSS1001

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity17.00
▷ Minimum class complexity17.00
▷ Maximum class complexity17.00
Average method complexity3.67
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods6100.00%
▷ Public methods6100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
There are no PNG files in this plugin