84% xolo-widgets

Code Review | Xolo Widgets

WordPress plugin Xolo Widgets scored84%from 54 tests.

About plugin

  • Plugin page: xolo-widgets
  • Plugin version: 1.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.4.1
  • WordPress version: 6.3.1
  • First release: Nov 28, 2020
  • Latest release: Nov 28, 2020
  • Number of updates: 2
  • Update frequency: every 95.0 days
  • Top authors: xolosoftware (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /342 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.20MB] [CPU: ▼6.85ms] Passed 4 tests

Server-side resources used by Xolo Widgets
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.67 ▲0.2140.60 ▲1.53
Dashboard /wp-admin3.50 ▲0.1652.72 ▼14.25
Posts /wp-admin/edit.php3.62 ▲0.2650.29 ▼1.24
Add New Post /wp-admin/post-new.php6.10 ▲0.2285.87 ▼11.44
Media Library /wp-admin/upload.php3.43 ▲0.2034.46 ▼0.48

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 23 new files
Database: no new tables, 8 new options
New WordPress options
widget_social_widget
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
widget_xolo_contact_widget
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for Xolo Widgets
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,850 ▲10413.82 ▼0.571.97 ▲0.2541.31 ▼6.36
Dashboard /wp-admin2,227 ▲365.19 ▲0.15110.31 ▲8.2941.11 ▼0.60
Posts /wp-admin/edit.php2,114 ▲252.37 ▲0.3240.65 ▲3.5733.70 ▼1.07
Add New Post /wp-admin/post-new.php1,530 ▲1123.62 ▲0.63651.20 ▼4.7436.32 ▼22.95
Media Library /wp-admin/upload.php1,400 ▲124.39 ▲0.1399.32 ▲3.3240.72 ▼1.56

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
These items require your attention
  • This plugin does not fully uninstall, leaving 8 options in the database
    • widget_social_widget
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_xolo_contact_widget
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 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
Almost there! Just fix the following items
  • 5× PHP files trigger server errors when accessed directly:
    • > PHP Warning
      Use of undefined constant XOLO_WIDGETS_DIR - assumed 'XOLO_WIDGETS_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/xolo-widgets/classes/class-xolo-widgets.php on line 42
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/xolo-widgets/classes/widgets/class-social-widget.php:4
    • > PHP Warning
      require_once(XOLO_WIDGETS_DIRclasses/widgets/class-social-icons.php): failed to open stream: No such file or directory in wp-content/plugins/xolo-widgets/classes/class-xolo-widgets.php on line 42
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/xolo-widgets/classes/widgets/class-widget-contact.php:3
    • > PHP Fatal error
      require_once(): Failed opening required 'XOLO_WIDGETS_DIRclasses/widgets/class-social-icons.php' (include_path='.:/usr/share/php') in wp-content/plugins/xolo-widgets/classes/class-xolo-widgets.php on line 42

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
2 plugin tags: social widget, contact widget

xolo-widgets/xolo-widgets.php Passed 13 tests

The entry point to "Xolo Widgets" version 1.0 is a PHP file that has certain tags in its header comment area
110 characters long description:
Xolo Widget gives you a collection of widgets in fastest way to add more widgets into your WordPress website.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin4,311 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
CSS567392,569
PHP59256976
SVG200704
JavaScript2161562

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity22.00
▷ Minimum class complexity2.00
▷ Maximum class complexity43.00
Average method complexity4.71
▷ Minimum method complexity1.00
▷ Maximum method complexity23.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods17
▷ Static methods15.88%
▷ Public methods1694.12%
▷ Protected methods15.88%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
PNG images were not found in this plugin