73% mam-css3-accordion

Code Review | MAM CSS3 Accordion

WordPress plugin MAM CSS3 Accordion scored73%from 54 tests.

About plugin

  • Plugin page: mam-css3-accordion
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-3.5.2
  • WordPress version: 6.3.1
  • First release: Jan 24, 2015
  • Latest release: Jan 24, 2015
  • Number of updates: 4
  • Update frequency: N/A
  • Top authors: mamun_khan101010 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /620 total downloads

Benchmarks

Plugin footprint 65% 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: ▼1.96MB] [CPU: ▼49.41ms] Passed 4 tests

A check of server-side resources used by MAM CSS3 Accordion
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.03 ▼1.434.29 ▼34.57
Dashboard /wp-admin2.05 ▼1.265.84 ▼43.74
Posts /wp-admin/edit.php2.05 ▼1.316.02 ▼36.02
Add New Post /wp-admin/post-new.php2.05 ▼3.845.25 ▼83.30
Media Library /wp-admin/upload.php2.05 ▼1.184.84 ▼27.86

Server storage [IO: ▲0.01MB] [DB: ▲0.07MB] Passed 3 tests

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

Browser metrics Passed 4 tests

An overview of browser requirements for MAM CSS3 Accordion
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,897 ▲16213.53 ▼0.859.38 ▲7.6642.54 ▼1.32
Dashboard /wp-admin2,212 ▲234.86 ▼0.07112.15 ▼6.2040.58 ▼6.97
Posts /wp-admin/edit.php2,095 ▲62.01 ▼0.0135.64 ▲2.0030.59 ▼5.14
Add New Post /wp-admin/post-new.php1,520 ▲117.57 ▼5.49663.15 ▼14.1054.85 ▲0.90
Media Library /wp-admin/upload.php1,388 ▼04.19 ▼0.0199.50 ▲5.4341.27 ▲1.19

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • The plugin did not uninstall gracefully
    • > 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 mam-accordion-hover-button-slider-jquery handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not 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/mam-css3-accordion/hover-accordion.php:12
    • > 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/mam-css3-accordion/hover-accordion.php on line 12

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Please fix the following attributes:
  • Screenshots: Add an image for screenshot #1 (It is fully responsive.)
  • Contributors: The plugin contributors field is missing
You can take inspiration from this readme.txt

mam-css3-accordion/hover-accordion.php 85% from 13 tests

Analyzing the main PHP file in "MAM CSS3 Accordion" version 1.0
It is important to fix the following:
  • Description: The description should be shorter than 140 characters (currently 148 characters long)
  • Main file name: The principal plugin file should be the same as the plugin slug ("mam-css3-accordion.php" instead of "hover-accordion.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Success! There were no dangerous files found in this plugin194 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
CSS22225126
PHP1341140
JavaScript162628

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were 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%
Functions5
▷ Named functions5100.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
There are no PNG files in this plugin