10% contagen-widget

Code Review | ContaGen Widget

WordPress plugin ContaGen Widget scored10%from 54 tests.

About plugin

  • Plugin page: contagen-widget
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-4.0
  • WordPress version: 6.3.1
  • First release: Sep 23, 2016
  • Latest release: Sep 24, 2016
  • Number of updates: 9
  • Update frequency: every 0.1 days
  • Top authors: Pravin Walokar (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /721 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
The following installer errors require your attention
  • This plugin did not install gracefully
    • > Deprecated in wp-content/plugins/contagen-widget/contagen_widgets.php+210
    Function create_function() is deprecated

Server metrics [RAM: ▼1.90MB] [CPU: ▼57.72ms] Passed 4 tests

Server-side resources used by ContaGen Widget
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.09 ▼1.389.26 ▼32.54
Dashboard /wp-admin2.11 ▼1.206.61 ▼49.29
Posts /wp-admin/edit.php2.11 ▼1.255.69 ▼43.98
Add New Post /wp-admin/post-new.php2.11 ▼3.786.28 ▼105.06
Media Library /wp-admin/upload.php2.11 ▼1.126.42 ▼31.69

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 10 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
widget_recent-posts
widget_cgwgt_contagen_widgets
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

ContaGen Widget: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,819 ▲3314.65 ▼0.141.99 ▲0.1743.31 ▼7.41
Dashboard /wp-admin2,224 ▲215.80 ▼0.10104.97 ▼2.0941.78 ▼3.98
Posts /wp-admin/edit.php2,100 ▼31.99 ▼0.0539.82 ▲1.9034.73 ▼0.15
Add New Post /wp-admin/post-new.php1,550 ▲423.05 ▼0.11624.54 ▼31.7763.66 ▼1.80
Media Library /wp-admin/upload.php1,403 ▲34.32 ▲0.17104.82 ▼19.8244.11 ▼4.52

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin cannot be uninstalled
    • > Deprecated in wp-content/plugins/contagen-widget/contagen_widgets.php+210
    Function create_function() is deprecated
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • theysaidso_admin_options
    • widget_cgwgt_contagen_widgets
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP Passed 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
8 plugin tags: contact info widget, footer, info, sidebar, phone...

contagen-widget/contagen_widgets.php 85% from 13 tests

The main PHP script in "ContaGen Widget" version 1.0.0 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("contagen-widget.php" instead of "contagen_widgets.php")
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Success! There were no dangerous files found in this plugin848 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
SVG100685
PHP13837145
CSS21318

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity20.00
▷ Minimum class complexity20.00
▷ Maximum class complexity20.00
Average method complexity5.75
▷ Minimum method complexity1.00
▷ Maximum method complexity11.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%
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

Using a strong compression for your PNG files is a great way to speed-up your plugin
There are no PNG files in this plugin