84% archive-widget-collapsed-with-css

Code Review | Archive widget collapsed with CSS

WordPress plugin Archive widget collapsed with CSS scored84%from 54 tests.

About plugin

  • Plugin page: archive-widget-co...
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-5.4.1
  • WordPress version: 6.3.1
  • First release: Nov 11, 2019
  • Latest release: May 2, 2020
  • Number of updates: 4
  • Update frequency: every 43.5 days
  • Top authors: yossybunny (100%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active /700 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.08MB] [CPU: ▼6.01ms] Passed 4 tests

A check of server-side resources used by Archive widget collapsed with CSS
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0837.63 ▼13.70
Dashboard /wp-admin3.39 ▲0.0844.55 ▼10.01
Posts /wp-admin/edit.php3.44 ▲0.0849.94 ▲1.55
Add New Post /wp-admin/post-new.php5.97 ▲0.0897.45 ▲7.49
Media Library /wp-admin/upload.php3.31 ▲0.0834.49 ▼1.86
Archive widget collapsed with CSS /wp-admin/options-general.php?page=archive-widget-collapsed-with-css3.2833.31

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 20 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
widget_recent-posts
db_upgraded
widget_archive_widget_collapsed_with_css
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for Archive widget collapsed with CSS
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,808 ▲7313.18 ▼1.121.67 ▼0.3840.78 ▼5.13
Dashboard /wp-admin2,215 ▲244.81 ▼1.10112.27 ▲13.3238.58 ▼3.00
Posts /wp-admin/edit.php2,098 ▲62.06 ▲0.0643.18 ▼4.4437.02 ▼0.38
Add New Post /wp-admin/post-new.php1,543 ▲1518.40 ▼4.81602.55 ▼61.1750.90 ▼18.67
Media Library /wp-admin/upload.php1,388 ▼04.16 ▼0.0198.33 ▼1.0842.12 ▼3.84
Archive widget collapsed with CSS /wp-admin/options-general.php?page=archive-widget-collapsed-with-css8612.0131.9850.95

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_archive_widget_collapsed_with_css

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 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 3× 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/archive-widget-collapsed-with-css/awcwc-admin.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/archive-widget-collapsed-with-css/archive-widget-collapsed-with-css.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/archive-widget-collapsed-with-css/awcwc-widget-form.php:2

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 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that require attention:
  • Requires php: Version not formatted correctly
Please take inspiration from this readme.txt

archive-widget-collapsed-with-css/archive-widget-collapsed-with-css.php Passed 13 tests

Analyzing the main PHP file in "Archive widget collapsed with CSS" version 1.0.1
62 characters long description:
Archive widget that is displayed in a collapsed form with CSS.

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
There were no executable files found in this plugin595 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
CSS510368
PHP55310227

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.20
Average class complexity15.00
▷ Minimum class complexity15.00
▷ Maximum class complexity15.00
Average method complexity4.50
▷ Minimum method complexity1.00
▷ Maximum method complexity9.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%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
8 compressed PNG files occupy 0.04MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/pattern-1.png7.09KB5.63KB▼ 20.57%
images/widjet_awcwc.png1.62KB1.53KB▼ 5.50%
images/widjet_awcwc_setting.png3.39KB2.97KB▼ 12.37%
images/widjet_awcwc_setting_ja.png3.57KB3.14KB▼ 11.98%
images/pattern-4.png7.74KB6.84KB▼ 11.62%