84% simple-database-repair

Code Review | Simple Database Repair

WordPress plugin Simple Database Repair scored84%from 54 tests.

About plugin

  • Plugin page: simple-database-r...
  • Plugin version: 2.3
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2.2-6.1
  • WordPress version: 6.3.1
  • First release: Aug 15, 2019
  • Latest release: Jan 3, 2023
  • Number of updates: 91
  • Update frequency: every 13.6 days
  • Top authors: phpsquare (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

600+ active /19,112 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.00MB] [CPU: ▼4.79ms] Passed 4 tests

Server-side resources used by Simple Database Repair
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0043.70 ▲2.52
Dashboard /wp-admin3.31 ▲0.0148.48 ▼2.62
Posts /wp-admin/edit.php3.36 ▲0.0047.18 ▼2.40
Add New Post /wp-admin/post-new.php5.89 ▲0.0089.03 ▼12.61
Media Library /wp-admin/upload.php3.23 ▲0.0035.08 ▼1.51

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Simple Database Repair
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,807 ▲4613.92 ▼0.631.78 ▲0.1544.13 ▼1.17
Dashboard /wp-admin2,216 ▲395.63 ▼0.0290.31 ▼13.2143.42 ▼0.84
Posts /wp-admin/edit.php2,118 ▲182.02 ▲0.0736.35 ▼3.1135.82 ▼2.68
Add New Post /wp-admin/post-new.php1,541 ▲1323.72 ▲0.91648.23 ▼25.4465.82 ▲6.07
Media Library /wp-admin/upload.php1,421 ▲214.19 ▲0.0298.37 ▼4.5644.39 ▼0.75

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
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget

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 no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
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/simple-database-repair/simple-database-repair.php:27

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
3 plugin tags: database repair, fix database error, corrupt table fix

simple-database-repair/simple-database-repair.php Passed 13 tests

The principal PHP file in "Simple Database Repair" v. 2.3 is loaded by WordPress automatically on each request
80 characters long description:
A simple database repair plugin which can be used to repair wordpress database .

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin90 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP1162578
CSS10012

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.64
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%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
No PNG files were detected