83% my-wpdb

Code Review | My wpdb

WordPress plugin My wpdb scored83%from 54 tests.

About plugin

  • Plugin page: my-wpdb
  • Plugin version: 3.1.6
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-6.1
  • WordPress version: 6.3.1
  • First release: Feb 18, 2022
  • Latest release: Oct 27, 2022
  • Number of updates: 58
  • Update frequency: every 4.3 days
  • Top authors: shota6111 (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

40+ active /1,184 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼7.15ms] Passed 4 tests

Server-side resources used by My wpdb
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0144.12 ▼0.56
Dashboard /wp-admin3.31 ▲0.0150.35 ▼4.85
Posts /wp-admin/edit.php3.36 ▲0.0147.02 ▼6.61
Add New Post /wp-admin/post-new.php5.91 ▲0.0387.78 ▼16.59
Media Library /wp-admin/upload.php3.24 ▲0.0137.24 ▲3.96

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 25 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
db_upgraded
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for My wpdb
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,835 ▲4913.31 ▼0.691.67 ▼0.2734.00 ▼8.76
Dashboard /wp-admin2,238 ▲355.83 ▲0.9698.75 ▼12.0043.17 ▼0.38
Posts /wp-admin/edit.php2,117 ▲202.01 ▲0.0234.85 ▼3.6737.52 ▲2.28
Add New Post /wp-admin/post-new.php1,559 ▲2818.34 ▼4.92639.01 ▼51.6567.90 ▲15.70
Media Library /wp-admin/upload.php1,420 ▲174.23 ▲0.01100.43 ▼7.2845.10 ▲2.94

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 75% 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)
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 10× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Notice
      Undefined variable: Mywpdb_Get_Table in wp-content/plugins/my-wpdb/Includes/Component/c--search-form.php on line 7
    • > PHP Fatal error
      Uncaught Error: Call to a member function search_tables() on null in wp-content/plugins/my-wpdb/Includes/Component/c--search-form.php:7
    • > PHP Warning
      require_once(/Includes/Class/mywpdb--class.php): failed to open stream: No such file or directory in wp-content/plugins/my-wpdb/Includes/mywpdb--include.php on line 2
    • > PHP Fatal error
      Uncaught Error: Class 'Mywpdb_Get_Table' not found in wp-content/plugins/my-wpdb/Pages/page--tables.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'Mywpdb_Get_Table' not found in wp-content/plugins/my-wpdb/Pages/page--search.php:2
    • > PHP Notice
      Undefined variable: mywpdb_path in wp-content/plugins/my-wpdb/Includes/mywpdb--include.php on line 2
    • > PHP Fatal error
      Uncaught Error: Class 'Mywpdb_Delete' not found in wp-content/plugins/my-wpdb/Pages/page--table.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'Mywpdb_Get_Table' not found in wp-content/plugins/my-wpdb/Pages/page--table-row.php:2
    • > PHP Fatal error
      require_once(): Failed opening required '/Includes/Class/mywpdb--class.php' (include_path='.:/usr/share/php') in wp-content/plugins/my-wpdb/Includes/mywpdb--include.php on line 2
    • > PHP Fatal error
      Uncaught Error: Class 'Mywpdb_Get_Table' not found in wp-content/plugins/my-wpdb/Pages/page.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need to be fixed:
  • Screenshots: These screenshots need descriptions #1, #2, #3 in my-wpdb/assets to your readme.txt
The official readme.txt might help

my-wpdb/mywpdb.php 85% from 13 tests

Analyzing the main PHP file in "My wpdb" version 3.1.6
You should first fix the following items:
  • Text Domain: The text domain follows the same naming rules as the plugin slug: lowercase characters and dashes
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("my-wpdb.php" instead of "mywpdb.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
No dangerous file extensions were detected1,969 lines of code in 24 files:
LanguageFilesBlank linesComment linesLines of code
CSS292322756
PHP16154154716
Sass412116476
Markdown14015
JavaScript1006

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity6.40
▷ Minimum class complexity4.00
▷ Maximum class complexity9.00
Average method complexity2.80
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods15
▷ Static methods00.00%
▷ Public methods15100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions14
▷ Named functions14100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There were not PNG files found in your plugin