78% biodic-automatic-word-link

Code Review | Name: BioDic AWL

WordPress plugin Name: BioDic AWLscored78%from 54 tests.

About plugin

  • Plugin page: biodic-automatic-...
  • Plugin version: 1.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-5.6
  • WordPress version: 6.3.1
  • First release: Jan 20, 2014
  • Latest release: Nov 24, 2020
  • Number of updates: 26
  • Update frequency: every 96.2 days
  • Top authors: crishnakh (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,181 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲7.39MB] [CPU: ▼3.85ms] 75% from 4 tests

Server-side resources used by Name: BioDic AWL
Please fix the following
  • Extra RAM: Extra memory usage must be kept under 5MB (currently 7.39MB on /wp-admin/upload.php)
PageMemory (MB)CPU Time (ms)
Home /34.28 ▲30.8281.63 ▲38.75
Dashboard /wp-admin3.38 ▲0.0847.00 ▼0.44
Posts /wp-admin/edit.php3.43 ▲0.0849.51 ▲0.75
Add New Post /wp-admin/post-new.php35.23 ▲29.3470.79 ▼21.71
Media Library /wp-admin/upload.php3.31 ▲0.0837.20 ▲5.99

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 13 new files
Database: no new tables, 15 new options
New WordPress options
widget_theysaidso_widget
biodic_glossaryTooltip
widget_recent-comments
db_upgraded
biodic_glossaryCaseSensitive
biodic_glossaryExcerptHover
can_compress_scripts
widget_recent-posts
biodic_glossaryFirstOnly
biodic_showTitleAttribute
...

Browser metrics Passed 4 tests

A check of browser resources used by Name: BioDic AWL
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,918 ▲18313.63 ▼0.747.21 ▲5.5345.14 ▼2.92
Dashboard /wp-admin2,224 ▲395.85 ▼0.0197.31 ▼4.5238.31 ▼6.61
Posts /wp-admin/edit.php2,107 ▲182.05 ▲0.0436.68 ▲0.2133.74 ▼0.82
Add New Post /wp-admin/post-new.php1,624 ▲8223.63 ▲5.62680.80 ▲73.1848.60 ▼1.79
Media Library /wp-admin/upload.php1,403 ▲154.31 ▲0.0696.42 ▼4.3241.34 ▼1.45

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 15 options in the database
    • biodic_glossaryTooltip
    • biodic_glossaryProtectedTags
    • biodic_showTitleAttribute
    • theysaidso_admin_options
    • db_upgraded
    • biodic_glossaryFirstOnly
    • widget_recent-posts
    • biodic_glossaryExcerptHover
    • biodic_glossaryFilterTooltip
    • biodic_glossaryInNewPage
    • ...

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Good news, no errors were detected

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/biodic-automatic-word-link/admin_nav.php
  • 6× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Warning
      Use of undefined constant RED_MENU_OPTION - assumed 'RED_MENU_OPTION' (this will throw an Error in a future version of PHP) in wp-content/plugins/biodic-automatic-word-link/admin_template.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function biodic_showNav() in wp-content/plugins/biodic-automatic-word-link/admin_template.php:3
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/biodic-automatic-word-link/admin_nav.php on line 5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_option() in wp-content/plugins/biodic-automatic-word-link/glossary.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_nonce_field() in wp-content/plugins/biodic-automatic-word-link/admin_settings.php:2
    • > PHP Notice
      Undefined variable: submenus in wp-content/plugins/biodic-automatic-word-link/admin_nav.php on line 5

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 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that need to be fixed:
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === Name: BioDic AWL=== )
You can take inspiration from this readme.txt

biodic-automatic-word-link/glossary.php 92% from 13 tests

"Name: BioDic AWL" version 1.5's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("biodic-automatic-word-link.php" instead of "glossary.php")

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
Good job! No executable or dangerous file extensions detected887 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP48964549
JavaScript2216271
CSS24167

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions12
▷ Named functions12100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
2 PNG files occupy 0.18MB with 0.12MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png129.67KB45.31KB▼ 65.06%
screenshot-2.png55.20KB16.14KB▼ 70.75%