79% mpcx-accordion

Code Review | Accordion

WordPress plugin Accordion scored79%from 54 tests.

About plugin

  • Plugin page: mpcx-accordion
  • Plugin version: 1.2.6
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.9
  • WordPress version: 6.3.1
  • First release: Mar 1, 2016
  • Latest release: Nov 10, 2017
  • Number of updates: 37
  • Update frequency: every 16.7 days
  • Top authors: DeusTron (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /1,716 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼3.35ms] Passed 4 tests

Analyzing server-side resources used by Accordion
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0337.83 ▼6.51
Dashboard /wp-admin3.33 ▲0.0346.20 ▼7.15
Posts /wp-admin/edit.php3.38 ▲0.0348.65 ▲4.13
Add New Post /wp-admin/post-new.php5.91 ▲0.0385.26 ▼2.39
Media Library /wp-admin/upload.php3.25 ▲0.0335.06 ▲2.67

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Accordion
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,895 ▲16013.58 ▼1.045.84 ▲4.0040.00 ▼9.04
Dashboard /wp-admin2,215 ▲275.83 ▲0.0296.97 ▼17.5338.36 ▼4.03
Posts /wp-admin/edit.php2,104 ▲121.99 ▼0.0040.79 ▲3.5935.55 ▲2.09
Add New Post /wp-admin/post-new.php1,552 ▲1918.32 ▼4.92625.19 ▲31.0060.99 ▲8.23
Media Library /wp-admin/upload.php1,403 ▲184.24 ▲0.0095.53 ▼4.7741.26 ▼2.28

Uninstaller [IO: ▲0.00MB] [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 does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget

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)
Even though everything seems fine, this is not an exhaustive test

SRP 0% 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
  • 5× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/mpcx-accordion/admin/options.php
    • > /wp-content/plugins/mpcx-accordion/mpcx-accordion.php
    • > /wp-content/plugins/mpcx-accordion/admin/edit.php
    • > /wp-content/plugins/mpcx-accordion/admin/delete.php
    • > /wp-content/plugins/mpcx-accordion/admin/list.php
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/mpcx-accordion/update.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/mpcx-accordion/fix.php:7

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
6 plugin tags: shortcode, accordion, plugin, jquery, javascript...

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

This is the main PHP file of "Accordion" version 1.2.6, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
25 characters long description:
Just an Accordion Plugin.

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
No dangerous file extensions were detected410 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
PHP93446334
PO File2222472
CSS2002
JavaScript2002

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.43
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%
Functions7
▷ Named functions00.00%
▷ Anonymous functions7100.00%
Constants2
▷ Global constants2100.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
No PNG files were detected