83% just-simple-accordions

Code Review | just Simple Accordions

WordPress plugin just Simple Accordions scored83%from 54 tests.

About plugin

  • Plugin page: just-simple-accor...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-4.7
  • WordPress version: 6.3.1
  • First release: Feb 15, 2017
  • Latest release: Apr 25, 2019
  • Number of updates: 9
  • Update frequency: every 88.8 days
  • Top authors: raihancse (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /2,939 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

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

This is a short check of server-side resources used by just Simple Accordions
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0443.23 ▼2.49
Dashboard /wp-admin3.34 ▲0.0357.05 ▲5.03
Posts /wp-admin/edit.php3.39 ▲0.0353.63 ▼1.37
Add New Post /wp-admin/post-new.php5.92 ▲0.0390.38 ▼24.86
Media Library /wp-admin/upload.php3.26 ▲0.0339.42 ▼0.41
Accordions /wp-admin/edit.php?post_type=accordian3.3041.76
Add New /wp-admin/post-new.php?post_type=accordian3.3852.22

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 19 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for just Simple Accordions
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,932 ▲17113.60 ▼0.679.35 ▲7.5838.70 ▼7.91
Dashboard /wp-admin2,222 ▲545.51 ▼0.1083.91 ▼12.1539.82 ▼7.22
Posts /wp-admin/edit.php2,127 ▲272.00 ▼0.0438.94 ▼3.9639.86 ▲0.61
Add New Post /wp-admin/post-new.php1,549 ▲2323.00 ▼0.10656.57 ▲4.3856.11 ▼3.25
Media Library /wp-admin/upload.php1,430 ▲304.09 ▼0.13102.01 ▼6.9343.62 ▼0.09
Accordions /wp-admin/edit.php?post_type=accordian1,0911.9632.3431.33
Add New /wp-admin/post-new.php?post_type=accordian2,1857.55178.6162.77

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means 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 take a closer look at the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/just-simple-accordions/index.php:19

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Please fix the following attributes:
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === just-simple-accordions === )
  • Screenshots: Add images for these screenshots: #1 (This is the first screen shot), #2 (This is the second screen shot), #3 (This is the third screen shot)
You can take inspiration from this readme.txt

just-simple-accordions/index.php 92% from 13 tests

"just Simple Accordions" version 1.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("just-simple-accordions.php" instead of "index.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
Everything looks great! No dangerous files found in this plugin66 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP122750
CSS12511
JavaScript1105

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.05
Average class complexity2.00
▷ Minimum class complexity2.00
▷ Maximum class complexity2.00
Average method complexity1.25
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.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
14 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
css/images/ui-bg_glass_100_fdf5ce_1x400.png0.34KB0.16KB▼ 54.02%
css/images/ui-bg_diagonals-thick_20_666666_40x40.png0.30KB0.15KB▼ 49.68%
css/images/ui-bg_flat_10_000000_40x100.png0.20KB0.08KB▼ 57.56%
css/images/ui-icons_ffd27a_256x240.png4.44KB4.17KB▼ 6.02%
css/images/ui-icons_ffffff_256x240.png6.15KB4.17KB▼ 32.13%