10% wp-core-contributions-widget

Code Review | WP Core Contributions Widget

WordPress plugin WP Core Contributions Widget scored 10% from 54 tests.

About plugin

  • Plugin page: wp-core-contribut...
  • Plugin version: 1.2.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2.1-3.4
  • WordPress version: 6.3.1
  • First release: Dec 12, 2011
  • Latest release: May 8, 2012
  • Number of updates: 10
  • Update frequency: every 14.8 days
  • Top authors: ericmann (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 2,955 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
These installer errors require your attention
  • The plugin did not install without errors
    • > Deprecated in wp-content/plugins/wp-core-contributions-widget/lib/class.wp-core-contributions-widget.php+4
    Methods with the same name as their class will not be constructors in a future version of PHP; WP_Core_Contributions_Widget has a deprecated constructor

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

An overview of server-side resources used by WP Core Contributions Widget
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.09 ▼1.376.49 ▼31.79
Dashboard /wp-admin2.11 ▼1.197.30 ▼40.61
Posts /wp-admin/edit.php2.11 ▼1.256.60 ▼34.76
Add New Post /wp-admin/post-new.php2.11 ▼3.786.27 ▼90.24
Media Library /wp-admin/upload.php2.11 ▼1.126.71 ▼26.07

Server storage [IO: ▲0.05MB] [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: 13 new files
Database: no new tables, 8 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
widget_wp_codex_contributions_widget
widget_wp_core_contributions_widget
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for WP Core Contributions Widget
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.19 ▼1.194.69 ▲2.9944.63 ▼2.73
Dashboard /wp-admin2,209 ▲174.80 ▼0.14103.58 ▼4.6438.63 ▼5.82
Posts /wp-admin/edit.php2,086 ▼01.99 ▼0.0133.87 ▼1.6233.46 ▲0.68
Add New Post /wp-admin/post-new.php1,533 ▲1423.53 ▲0.37636.56 ▲9.2751.83 ▼3.24
Media Library /wp-admin/upload.php1,388 ▲64.20 ▼0.04108.64 ▲13.3446.93 ▲5.17

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% 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 did not uninstall without warnings or errors
    • > Deprecated in wp-content/plugins/wp-core-contributions-widget/lib/class.wp-core-contributions-widget.php+4
    Methods with the same name as their class will not be constructors in a future version of PHP; WP_Core_Contributions_Widget has a deprecated constructor
  • Zombie WordPress options were found after uninstall: 8 options
    • widget_wp_codex_contributions_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • widget_wp_core_contributions_widget
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

SRP 0% from 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
Please take a closer look at the following
  • 2× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/wp-core-contributions-widget/inc/wp-codex-contributions-widget-template.php
    • > /wp-content/plugins/wp-core-contributions-widget/inc/wp-core-contributions-widget-template.php
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/wp-core-contributions-widget/lib/class.wp-codex-contributions-widget.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/wp-core-contributions-widget/lib/class.wp-core-contributions-widget.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/wp-core-contributions-widget/wp-core-contributions-widget.php:30

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that require attention:
  • Screenshots: Add an image for screenshot #1 (Example widget showing the default Codex contributions widget on the Twenty Eleven theme (contributions by [ericmann](http://profiles.wordpress.org/users/ericmann/).)
Please take inspiration from this readme.txt

wp-core-contributions-widget/wp-core-contributions-widget.php Passed 13 tests

The primary PHP file in "WP Core Contributions Widget" version 1.2.2 is used by WordPress to initiate all plugin functionality
80 characters long description:
Add a list of your accepted contributions to WordPress Core as a sidebar widget.

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
Good job! No executable or dangerous file extensions detected426 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP67771304
PO File23861122

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.28
Average class complexity11.67
▷ Minimum class complexity11.00
▷ Maximum class complexity13.00
Average method complexity3.13
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods15
▷ Static methods746.67%
▷ Public methods15100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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
2 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png7.21KB3.73KB▼ 48.32%
screenshot-1.png9.79KB3.78KB▼ 61.37%