10% wikipedia-widget

Code Review | Wikipedia Widget

WordPress plugin Wikipedia Widget scored10%from 54 tests.

About plugin

  • Plugin page: wikipedia-widget
  • Plugin version: 0.13.12
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.2
  • WordPress version: 6.3.1
  • First release: Apr 2, 2013
  • Latest release: May 13, 2015
  • Number of updates: 11
  • Update frequency: every 70.5 days
  • Top authors: asimeon (90.91%)triechert (18.18%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /3,707 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
It is recommended to fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/wikipedia-widget/wikipedia-widget.php+236
    Function create_function() is deprecated

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

An overview of server-side resources used by Wikipedia Widget
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.10 ▼1.364.58 ▼34.60
Dashboard /wp-admin2.12 ▼1.186.13 ▼39.68
Posts /wp-admin/edit.php2.12 ▼1.246.99 ▼36.93
Add New Post /wp-admin/post-new.php2.12 ▼3.777.28 ▼86.19
Media Library /wp-admin/upload.php2.12 ▼1.115.36 ▼26.84

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Wikipedia Widget
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲4314.35 ▼0.021.70 ▼0.0138.79 ▼1.90
Dashboard /wp-admin2,195 ▲155.63 ▼0.0493.57 ▲6.9839.62 ▼7.03
Posts /wp-admin/edit.php2,100 ▲32.03 ▲0.0542.07 ▲7.0139.20 ▲1.86
Add New Post /wp-admin/post-new.php1,526 ▼1223.19 ▼0.00672.14 ▲4.1582.32 ▲27.46
Media Library /wp-admin/upload.php1,403 ▲34.41 ▲0.2496.49 ▼4.9044.17 ▼2.33

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • The plugin did not uninstall gracefully
    • > Deprecated in wp-content/plugins/wikipedia-widget/wikipedia-widget.php+236
    Function create_function() is deprecated
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_wikipedia_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 50% 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
The following issues need your attention
  • 1× 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/wikipedia-widget/wikipedia-widget.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

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
Please fix the following attributes:
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === wikipedia-widget === )
You can take inspiration from this readme.txt

wikipedia-widget/wikipedia-widget.php Passed 13 tests

This is the main PHP file of "Wikipedia Widget" version 0.13.12, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
120 characters long description:
Shows a simple Ajax based Wikipedia search-formular and the results for the current post/page title or default keywords.

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
Success! There were no dangerous files found in this plugin232 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP12163152
JavaScript16160
CSS10020

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.18
Average class complexity17.00
▷ Minimum class complexity17.00
▷ Maximum class complexity17.00
Average method complexity2.78
▷ Minimum method complexity2.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods9
▷ Static methods00.00%
▷ Public methods9100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
No PNG files were detected