10% archive-posts-accordion-panel

Code Review | Archive Posts Accordion Panel

WordPress plugin Archive Posts Accordion Panel scored10%from 54 tests.

About plugin

  • Plugin page: archive-posts-acc...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-4.9
  • WordPress version: 6.3.1
  • First release: May 24, 2016
  • Latest release: Jan 20, 2018
  • Number of updates: 13
  • Update frequency: every 46.6 days
  • Top authors: ikhodal (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /1,678 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Please fix the following installer errors
  • The plugin cannot be installed
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in archivesPostAccordionWidget is deprecated since version 4.3.0! Use __construct() instead.

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

Analyzing server-side resources used by Archive Posts Accordion Panel
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.05 ▼1.415.11 ▼43.03
Dashboard /wp-admin2.07 ▼1.237.40 ▼41.08
Posts /wp-admin/edit.php2.07 ▼1.289.59 ▼36.05
Add New Post /wp-admin/post-new.php2.07 ▼3.815.78 ▼89.96
Media Library /wp-admin/upload.php2.07 ▼1.168.20 ▼27.12

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Archive Posts Accordion Panel
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,900 ▲16513.60 ▼0.796.80 ▲4.8938.82 ▼7.58
Dashboard /wp-admin2,207 ▲224.90 ▼0.94113.19 ▲15.9842.05 ▲5.70
Posts /wp-admin/edit.php2,099 ▲102.00 ▼0.0339.77 ▲0.8334.08 ▲3.10
Add New Post /wp-admin/post-new.php1,534 ▲2018.25 ▲0.52629.93 ▼13.0357.48 ▲8.71
Media Library /wp-admin/upload.php1,392 ▲14.17 ▲0.0192.46 ▼3.4842.18 ▲0.57

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • Uninstall procedure validation failed for this plugin
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in archivesPostAccordionWidget is deprecated since version 4.3.0! Use __construct() instead.
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_archivespostaccordionadmin
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 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
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that need to be fixed:
  • Tags: Too many tags (29 tag instead of maximum 10); only the first 5 tags are used in your directory listing
Please take inspiration from this readme.txt

archive-posts-accordion-panel/plugin.php 92% from 13 tests

The main PHP file in "Archive Posts Accordion Panel" ver. 1.0 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("archive-posts-accordion-panel.php" instead of "plugin.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected1,234 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
PHP13166355832
JavaScript2162164
PO File1520122
CSS21112116

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity10.00
▷ Minimum class complexity4.00
▷ Maximum class complexity15.00
Average method complexity2.23
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes133.33%
▷ Concrete classes266.67%
▷ Final classes00.00%
Methods22
▷ Static methods00.00%
▷ Public methods2090.91%
▷ Protected methods00.00%
▷ Private methods29.09%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants17
▷ Global constants17100.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
10 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/ac2_open.png0.52KB0.58KB0.00%
assets/images/ac_close.png0.27KB0.17KB▼ 34.80%
assets/images/ac_open.png0.30KB0.19KB▼ 35.41%
assets/images/searchicon.png0.80KB0.82KB0.00%
assets/images/ac_bottom.png0.28KB0.27KB▼ 5.54%