10% biodic-word-of-the-day-widget-spanish

Code Review | BioDic Widget - Diccionario de Biología

WordPress plugin BioDic Widget - Diccionario de Biología scored10%from 54 tests.

About plugin

  • Plugin page: biodic-word-of-th...
  • Plugin version: 1.6.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-5.6
  • WordPress version: 6.3.1
  • First release: Sep 17, 2013
  • Latest release: Nov 24, 2020
  • Number of updates: 50
  • Update frequency: every 52.5 days
  • Top authors: crishnakh (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,324 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
  • The plugin cannot be installed
    • > Deprecated in wp-content/plugins/biodic-word-of-the-day-widget-spanish/biodic_widget.php+18
    Methods with the same name as their class will not be constructors in a future version of PHP; wp_my_plugin has a deprecated constructor

Server metrics [RAM: ▼1.92MB] [CPU: ▼58.78ms] Passed 4 tests

An overview of server-side resources used by BioDic Widget - Diccionario de Biología
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.06 ▼1.404.56 ▼38.62
Dashboard /wp-admin2.08 ▼1.225.62 ▼45.14
Posts /wp-admin/edit.php2.08 ▼1.275.05 ▼49.74
Add New Post /wp-admin/post-new.php2.08 ▼3.806.53 ▼101.63
Media Library /wp-admin/upload.php2.08 ▼1.145.58 ▼29.39

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 4 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
db_upgraded
widget_wp_my_plugin
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

BioDic Widget - Diccionario de Biología: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.35 ▼0.271.71 ▼0.2147.85 ▲2.50
Dashboard /wp-admin2,198 ▲285.63 ▲0.0387.50 ▼18.2038.95 ▼5.26
Posts /wp-admin/edit.php2,097 ▼31.97 ▼0.0035.42 ▼5.1933.43 ▼2.04
Add New Post /wp-admin/post-new.php1,526 ▼322.87 ▼0.67655.15 ▲23.7964.45 ▲12.40
Media Library /wp-admin/upload.php1,400 ▼34.15 ▼0.08110.48 ▲6.6249.65 ▲6.18

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
Please fix the following items
  • The plugin did not uninstall gracefully
    • > Deprecated in wp-content/plugins/biodic-word-of-the-day-widget-spanish/biodic_widget.php+18
    Methods with the same name as their class will not be constructors in a future version of PHP; wp_my_plugin has a deprecated constructor
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • widget_wp_my_plugin
    • can_compress_scripts

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
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/biodic-word-of-the-day-widget-spanish/biodic_widget.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 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
These attributes need to be fixed:
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === biodic-word-of-the-day-widget-spanish === )
You can take inspiration from this readme.txt

biodic-word-of-the-day-widget-spanish/biodic_widget.php 85% from 13 tests

The entry point to "BioDic Widget - Diccionario de Biología" version 1.6.3 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Main file name: Name the main plugin file the same as the plugin slug ("biodic-word-of-the-day-widget-spanish.php" instead of "biodic_widget.php")
  • Description: Keep the plugin description shorter than 140 characters (currently 174 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Everything looks great! No dangerous files found in this plugin56 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1212656

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.09
Average class complexity4.00
▷ Minimum class complexity4.00
▷ Maximum class complexity4.00
Average method complexity1.75
▷ Minimum method complexity1.00
▷ Maximum method complexity3.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 functions00.00%
▷ Anonymous functions1100.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
1 PNG file occupies 0.09MB with 0.06MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png95.43KB30.76KB▼ 67.77%