84% category-selection-widget

Code Review | Category Selection Widget

WordPress plugin Category Selection Widget scored84%from 54 tests.

About plugin

  • Plugin page: category-selectio...
  • Plugin version: 0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.4
  • WordPress version: 6.3.1
  • First release: Mar 23, 2016
  • Latest release: Mar 23, 2016
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: quang777s (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /788 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

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

Server-side resources used by Category Selection Widget
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0335.58 ▼5.28
Dashboard /wp-admin3.34 ▲0.0350.34 ▼4.48
Posts /wp-admin/edit.php3.39 ▲0.0344.20 ▼4.67
Add New Post /wp-admin/post-new.php5.92 ▲0.0382.78 ▼12.64
Media Library /wp-admin/upload.php3.26 ▲0.0335.18 ▲0.29

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 5 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
widget_csw_widget
db_upgraded

Browser metrics Passed 4 tests

Category Selection Widget: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,894 ▲15913.61 ▼0.698.09 ▲6.3241.12 ▼4.19
Dashboard /wp-admin2,211 ▲234.93 ▲0.06111.68 ▼6.6538.60 ▼6.42
Posts /wp-admin/edit.php2,094 ▲82.05 ▲0.0437.79 ▲1.3933.09 ▼2.48
Add New Post /wp-admin/post-new.php1,533 ▼023.05 ▼0.13677.83 ▼11.1060.83 ▲7.55
Media Library /wp-admin/upload.php1,396 ▲54.23 ▲0.0897.80 ▼9.1641.73 ▼9.17

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
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_theysaidso_widget
    • widget_csw_widget
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options

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 | 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
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/category-selection-widget/category-selection-widget.php:15

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Please fix the following attributes:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Admin config.), #2 (And display on front end.)
You can take inspiration from this readme.txt

category-selection-widget/category-selection-widget.php Passed 13 tests

"Category Selection Widget" version 0.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
66 characters long description:
Create category widget can re-select Posts when click on check box

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected91 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP1234179
JavaScript10012

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity11.00
▷ Minimum class complexity11.00
▷ Maximum class complexity11.00
Average method complexity3.00
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods00.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
2 PNG files occupy 0.09MB with 0.05MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png20.77KB11.14KB▼ 46.35%
screenshot-2.png67.05KB27.77KB▼ 58.59%