77% database-collation-fix

Code Review | Database Collation Fix

WordPress plugin Database Collation Fix scored77%from 54 tests.

About plugin

  • Plugin page: database-collatio...
  • Plugin version: 1.2.9
  • PHP compatiblity: 5.3.1+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-6.2
  • WordPress version: 6.3.1
  • First release: Apr 22, 2017
  • Latest release: May 6, 2023
  • Number of updates: 6
  • Update frequency: every 367.5 days
  • Top authors: davejesch (100%)

Code review

54 tests

User reviews

17 reviews

Install metrics

1,000+ active /16,057 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.07MB] [CPU: ▼4.64ms] Passed 4 tests

An overview of server-side resources used by Database Collation Fix
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0735.33 ▼7.35
Dashboard /wp-admin3.38 ▲0.0745.43 ▲0.22
Posts /wp-admin/edit.php3.43 ▲0.0745.87 ▼3.73
Add New Post /wp-admin/post-new.php5.96 ▲0.0784.78 ▼7.71
Media Library /wp-admin/upload.php3.30 ▲0.0736.50 ▲2.61
Collation Fix /wp-admin/tools.php?page=ds-db-collation3.2428.22

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
db_upgraded
widget_recent-comments
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Database Collation Fix
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6913.23 ▼0.761.85 ▲0.0840.11 ▼10.10
Dashboard /wp-admin2,210 ▲254.89 ▲0.01108.32 ▲1.0040.23 ▼3.53
Posts /wp-admin/edit.php2,096 ▲102.02 ▼0.0139.19 ▲2.5135.91 ▲3.58
Add New Post /wp-admin/post-new.php1,536 ▲1123.20 ▼0.23668.18 ▼1.5850.66 ▼4.76
Media Library /wp-admin/upload.php1,389 ▲44.20 ▼0.0696.27 ▼0.1740.17 ▼2.47
Collation Fix /wp-admin/tools.php?page=ds-db-collation7922.0324.8126.19

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Please fix the following server-side errors
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/tools.php?page=ds-db-collation
    • > Notice in wp-includes/functions.php+1179
    Undefined offset: 0
    • > GET request to /wp-admin/tools.php?page=ds-db-collation
    • > Notice in wp-includes/functions.php+1179
    Undefined offset: 1

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
  • 4× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Notice
      Trying to get property 'action' of non-object in wp-content/plugins/database-collation-fix/prepend.php on line 19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/database-collation-fix/databasecollationfix.php:41
    • > PHP Notice
      Trying to get property 'last_ui_event' of non-object in wp-content/plugins/database-collation-fix/prepend.php on line 19
    • > PHP Notice
      Trying to get property 'last_ui_event' of non-object in wp-content/plugins/database-collation-fix/prepend.php on line 17

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need your attention:
  • Screenshots: Add an image for screenshot #1 (Plugin page.)
The official readme.txt might help

database-collation-fix/databasecollationfix.php 77% from 13 tests

The main file in "Database Collation Fix" v. 1.2.9 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please take the time to fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 190 characters long)
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("database-collation-fix.php" instead of "databasecollationfix.php")
  • Domain Path: The domain path folder was not found ("/language")

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
There were no executable files found in this plugin313 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP259104311
Markdown1002

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity74.00
▷ Minimum class complexity74.00
▷ Maximum class complexity74.00
Average method complexity7.08
▷ Minimum method complexity1.00
▷ Maximum method complexity33.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods12
▷ Static methods216.67%
▷ Public methods758.33%
▷ Protected methods00.00%
▷ Private methods541.67%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants240.00%
▷ Class constants360.00%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG images were found in this plugin