94% widgetizer

Code Review | Widgetizer

WordPress plugin Widgetizer scored 94% from 54 tests.

About plugin

  • Plugin page: widgetizer
  • Plugin version: 1.0.3
  • PHP compatiblity: 5.6.20+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.3
  • WordPress version: 5.8.1
  • First release: Dec 9, 2019
  • Latest release: Dec 31, 2019
  • Number of updates: 9
  • Update frequency: every 2.6 days
  • Top authors: wpseed (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 424 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▼0.37MB] [CPU: ▼160.44ms] Passed 4 tests

Analyzing server-side resources used by Widgetizer
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.06 ▲0.2341.77 ▲3.78
Dashboard /wp-admin3.35 ▲0.2952.42 ▲5.93
Posts /wp-admin/edit.php3.40 ▲0.2947.67 ▼3.83
Add New Post /wp-admin/post-new.php3.23 ▼2.2026.57 ▼641.35
Media Library /wp-admin/upload.php3.23 ▲0.2338.32 ▼0.37

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 242 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

An overview of browser requirements for Widgetizer
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,723 ▲12715.83 ▼0.1112.96 ▲4.5747.20 ▼0.46
Dashboard /wp-admin2,987 ▲535.92 ▼0.05159.33 ▼28.02112.97 ▼5.31
Posts /wp-admin/edit.php2,759 ▲202.70 ▼0.0275.07 ▲6.1488.24 ▼2.89
Add New Post /wp-admin/post-new.php1,696 ▲19618.80 ▲0.38565.66 ▲160.72119.66 ▲2.56
Media Library /wp-admin/upload.php1,827 ▲205.04 ▼0.03149.87 ▼15.01122.34 ▼2.17

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The plugin uninstalled completely, with no zombie files or tables

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not 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 fix the following
  • 104× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Trait 'Nette\\StaticClass' not found in wp-content/plugins/widgetizer/vendor/nette/php-generator/src/PhpGenerator/Helpers.php on line 16
    • > PHP Fatal error
      Uncaught Error: Class 'Symfony\\Component\\Finder\\Iterator\\FilterIterator' not found in wp-content/plugins/widgetizer/vendor/symfony/finder/Iterator/DepthRangeFilterIterator.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/widgetizer/vendor/symfony/finder/Tests/Comparator/ComparatorTest.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'Symfony\\Component\\Finder\\Iterator\\FilterIterator' not found in wp-content/plugins/widgetizer/vendor/symfony/finder/Iterator/ExcludeDirectoryFilterIterator.php:19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function PHPSTORM_META\\override() in wp-content/plugins/widgetizer/vendor/nette/utils/.phpstorm.meta.php:5
    • > PHP Fatal error
      Trait 'Latte\\Strict' not found in wp-content/plugins/widgetizer/vendor/latte/latte/src/Latte/Engine.php on line 14
    • > PHP Fatal error
      Trait 'Latte\\Strict' not found in wp-content/plugins/widgetizer/vendor/latte/latte/src/Latte/Runtime/Template.php on line 17
    • > PHP Fatal error
      Trait 'Nette\\SmartObject' not found in wp-content/plugins/widgetizer/vendor/nette/php-generator/src/PhpGenerator/ClassType.php on line 20
    • > PHP Fatal error
      Uncaught Error: Class 'Symfony\\Component\\Finder\\Iterator\\MultiplePcreFilterIterator' not found in wp-content/plugins/widgetizer/vendor/symfony/finder/Iterator/FilenameFilterIterator.php:21
    • > PHP Fatal error
      Uncaught Error: Class 'Symfony\\Component\\Finder\\Iterator\\FilterIterator' not found in wp-content/plugins/widgetizer/vendor/symfony/finder/Iterator/DateRangeFilterIterator.php:21

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
4 plugin tags: gutenberg widget, elementor, elementor widget, gutenberg

widgetizer/widgetizer.php 85% from 13 tests

Analyzing the main PHP file in "Widgetizer" version 1.0.3
Please make the necessary changes and fix the following:
  • Domain Path: The domain path points to a folder that does not exist ("/languages")
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin83,013 lines of code in 191 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript25,9316,00035,752
CSS37,84617029,469
PHP1744,2097,02315,416
C118847879
Markdown62860674
JSON100553
C/C++ Header24046132
reStructuredText19413597
m41111141

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity14.97
▷ Minimum class complexity1.00
▷ Maximum class complexity167.00
Average method complexity3.06
▷ Minimum method complexity1.00
▷ Maximum method complexity92.00
Code structure
Namespaces35
Interfaces13
Traits7
Classes166
▷ Abstract classes53.01%
▷ Concrete classes16196.99%
▷ Final classes63.73%
Methods1,256
▷ Static methods25220.06%
▷ Public methods1,16592.75%
▷ Protected methods393.11%
▷ Private methods524.14%
Functions126
▷ Named functions1310.32%
▷ Anonymous functions11389.68%
Constants65
▷ Global constants57.69%
▷ Class constants6092.31%
▷ Public constants60100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There were not PNG files found in your plugin