83% perfect-accordion

Code Review | Perfect Accordion

WordPress plugin Perfect Accordion scored83%from 54 tests.

About plugin

  • Plugin page: perfect-accordion
  • Plugin version: 2.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.2.2
  • WordPress version: 6.3.1
  • First release: May 16, 2014
  • Latest release: Jul 8, 2015
  • Number of updates: 15
  • Update frequency: every 27.9 days
  • Top authors: sozan45 (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

10+ active /2,794 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

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

This is a short check of server-side resources used by Perfect Accordion
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0437.70 ▼2.08
Dashboard /wp-admin3.34 ▲0.0348.22 ▼6.46
Posts /wp-admin/edit.php3.39 ▲0.0351.30 ▼0.02
Add New Post /wp-admin/post-new.php5.92 ▲0.03105.62 ▼1.26
Media Library /wp-admin/upload.php3.26 ▲0.0336.28 ▼1.44
All Accordion /wp-admin/edit.php?post_type=accordion_posts3.3037.46
Add New Accordion /wp-admin/post-new.php?post_type=accordion_posts3.3752.76

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 16 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for Perfect Accordion
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,937 ▲17613.80 ▼0.828.91 ▲6.8240.96 ▼2.13
Dashboard /wp-admin2,213 ▲335.64 ▼0.0392.89 ▼8.9274.05 ▲30.64
Posts /wp-admin/edit.php2,133 ▲332.03 ▲0.0937.00 ▼0.7833.08 ▼5.52
Add New Post /wp-admin/post-new.php1,554 ▲2822.96 ▼0.12685.49 ▲21.4854.14 ▼0.22
Media Library /wp-admin/upload.php1,433 ▲334.13 ▼0.18101.33 ▼7.4570.07 ▲22.25
All Accordion /wp-admin/edit.php?post_type=accordion_posts1,1031.9032.7929.47
Add New Accordion /wp-admin/post-new.php?post_type=accordion_posts2,2807.67176.25137.50

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts

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)
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/perfect-accordion/Accordion.php:16

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)
There were no browser issues found

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% 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
These attributes need your attention:
  • Contributors: Contributors not specified
  • Screenshots: No descriptions were found for these screenshots #2, #3 in perfect-accordion/assets to your readme.txt
The official readme.txt might help

perfect-accordion/Accordion.php 85% from 13 tests

The principal PHP file in "Perfect Accordion" v. 2.0.2 is loaded by WordPress automatically on each request
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("perfect-accordion.php" instead of "Accordion.php")
  • Description: Please don't use more than 140 characters for the plugin description (currently 440 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
No dangerous file extensions were detected260 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
CSS1204159
PHP2141176
JavaScript17025

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.09
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%
Functions4
▷ Named functions4100.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
11 PNG files occupy 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/arrow-down.png1.09KB0.31KB▼ 71.53%
img/style-one+.png0.68KB0.55KB▼ 19.63%
img/style-three+.png1.91KB1.36KB▼ 28.84%
img/arrow-up.png1.08KB0.32KB▼ 70.48%
img/style-two-.png1.17KB0.36KB▼ 69.58%