10% wp-database-fetch

Code Review | WP Database Fetch

WordPress plugin WP Database Fetch scored10%from 54 tests.

About plugin

  • Plugin page: wp-database-fetch
  • Plugin version: 1.3.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.4
  • WordPress version: 6.3.1
  • First release: Jan 3, 2016
  • Latest release: Feb 27, 2016
  • Number of updates: 12
  • Update frequency: every 4.6 days
  • Top authors: coder.salman (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,027 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
It is recommended to fix the following installer errors
  • Install procedure had errors
    • > Notice in wp-content/plugins/wp-database-fetch/assets/main.php+3
    Trying to access array offset on value of type bool

Server metrics [RAM: ▼1.91MB] [CPU: ▼49.63ms] Passed 4 tests

A check of server-side resources used by WP Database Fetch
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.08 ▼1.394.68 ▼35.02
Dashboard /wp-admin2.10 ▼1.216.62 ▼44.85
Posts /wp-admin/edit.php2.10 ▼1.268.67 ▼38.50
Add New Post /wp-admin/post-new.php2.10 ▼3.798.75 ▼80.13
Media Library /wp-admin/upload.php2.10 ▼1.135.44 ▼29.51

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 8 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
widget_fetch-data
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for WP Database Fetch
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,816 ▲7014.47 ▲0.091.72 ▼0.2045.62 ▼1.40
Dashboard /wp-admin2,219 ▲315.83 ▼0.07103.01 ▼10.9639.18 ▼2.84
Posts /wp-admin/edit.php2,105 ▲192.04 ▲0.0337.29 ▲0.7334.66 ▼2.41
Add New Post /wp-admin/post-new.php1,534 ▼823.21 ▲5.18674.88 ▲52.9953.51 ▼0.61
Media Library /wp-admin/upload.php1,404 ▲134.30 ▲0.08107.83 ▲4.0549.74 ▲6.90

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
You still need to fix the following
  • This plugin cannot be uninstalled
    • > Notice in wp-content/plugins/wp-database-fetch/assets/main.php+3
    Trying to access array offset on value of type bool
  • The uninstall procedure has failed, leaving 7 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • widget_fetch-data
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check 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
The following issues need your attention
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-database-fetch/assets/widget.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/wp-database-fetch/assets/main.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/wp-database-fetch/assets/shortcode.php:55

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 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
4 plugin tags: microsite, multisite, database, contentpull

wp-database-fetch/index.php 85% from 13 tests

"WP Database Fetch" version 1.3.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("wp-database-fetch.php" instead of "index.php")
  • Description: Keep the plugin description shorter than 140 characters (currently 347 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin168 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP42458168

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.18
Average class complexity2.00
▷ Minimum class complexity2.00
▷ Maximum class complexity2.00
Average method complexity1.25
▷ Minimum method complexity1.00
▷ Maximum method complexity2.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%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
3 PNG files occupy 0.15MB with 0.08MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/icon128x128.png3.79KB2.27KB▼ 40.22%
assets/screenshot-1.png137.82KB50.08KB▼ 63.66%
assets/banner-772x250.png13.65KB5.98KB▼ 56.16%