73% ppm-accordion

Code Review | PPM Accordion

WordPress plugin PPM Accordion scored73%from 54 tests.

About plugin

  • Plugin page: ppm-accordion
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-3.5.2
  • WordPress version: 6.3.1
  • First release: Jul 27, 2013
  • Latest release: Jul 27, 2013
  • Number of updates: 4
  • Update frequency: N/A
  • Top authors: perfectpointmarketing (100%)

Code review

54 tests

User reviews

13 reviews

Install metrics

600+ active /11,840 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼1.93MB] [CPU: ▼54.75ms] Passed 4 tests

A check of server-side resources used by PPM Accordion
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.05 ▼1.415.32 ▼35.08
Dashboard /wp-admin2.07 ▼1.235.92 ▼50.81
Posts /wp-admin/edit.php2.07 ▼1.285.87 ▼40.06
Add New Post /wp-admin/post-new.php2.07 ▼3.815.68 ▼90.77
Media Library /wp-admin/upload.php2.07 ▼1.165.22 ▼37.36

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 10 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
db_upgraded
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for PPM Accordion
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,897 ▲15113.68 ▼0.948.60 ▲6.7242.65 ▼0.96
Dashboard /wp-admin2,209 ▲184.90 ▼0.01100.90 ▼4.7640.94 ▼0.06
Posts /wp-admin/edit.php2,095 ▲62.04 ▲0.0336.84 ▼1.2433.72 ▼2.95
Add New Post /wp-admin/post-new.php1,520 ▼2223.30 ▲5.14652.47 ▼12.4150.82 ▼2.36
Media Library /wp-admin/upload.php1,397 ▲94.29 ▲0.0497.33 ▼8.2944.07 ▼1.24

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • Uninstall procedure validation failed for this plugin
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the ppm-accordion-plugin-main handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
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/ppm-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/ppm-accordion/plugin-hook.php on line 13

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

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Please fix the following attributes:
  • Screenshots: Add an image for screenshot #1 (PPM accordion in a post.)
  • Donate link: Invalid url: ""
You can look at the official readme.txt

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

The main file in "PPM Accordion" v. 1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
  • Main file name: Name the main plugin file the same as the plugin slug ("ppm-accordion.php" instead of "plugin-hook.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin456 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript39368410
PHP1231534
CSS12012

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No cyclomatic complexity issues were detected for this plugin
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

Often times overlooked, PNG files can occupy unnecessary space in 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%