10% wpmdb

Code Review | WPMDB

WordPress plugin WPMDB scored10%from 54 tests.

About plugin

  • Plugin page: wpmdb
  • Plugin version: 1.0
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3-5.3.2
  • WordPress version: 6.3.1
  • First release: Apr 4, 2020
  • Latest release: Apr 4, 2020
  • Number of updates: 4
  • Update frequency: every 0.3 days
  • Top authors: AHMAD_R3ZA (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

50+ active /2,057 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
These installer errors require your attention
  • The plugin cannot be installed
    • > Notice in wp-content/plugins/wpmdb/includes/class-wpmdb_donate.php+48
    Undefined index: status

Server metrics [RAM: ▼1.86MB] [CPU: ▼52.51ms] Passed 4 tests

Server-side resources used by WPMDB
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.13 ▼1.345.46 ▼37.36
Dashboard /wp-admin2.15 ▼1.167.84 ▼40.92
Posts /wp-admin/edit.php2.15 ▼1.217.23 ▼44.95
Add New Post /wp-admin/post-new.php2.15 ▼3.747.81 ▼86.79
Media Library /wp-admin/upload.php2.15 ▼1.086.35 ▼30.71
WP IMDB /wp-admin/options-general.php?page=wpmdb2.156.51

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 27 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
can_compress_scripts
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by WPMDB
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,801 ▲4014.65 ▲0.301.77 ▼0.7244.49 ▲1.71
Dashboard /wp-admin2,201 ▲245.63 ▼0.0399.10 ▲11.1140.43 ▲0.48
Posts /wp-admin/edit.php2,112 ▲122.05 ▲0.1038.98 ▲4.5838.44 ▲2.02
Add New Post /wp-admin/post-new.php6,229 ▲4,70325.85 ▲2.22936.32 ▲316.6265.45 ▲19.54
Media Library /wp-admin/upload.php1,415 ▲184.25 ▲0.0998.67 ▼7.6048.04 ▲1.85
WP IMDB /wp-admin/options-general.php?page=wpmdb8682.0825.7132.39

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • This plugin cannot be uninstalled
    • > Notice in wp-content/plugins/wpmdb/includes/class-wpmdb_donate.php+48
    Undefined index: status
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded

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
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=wpmdb
    • > POST request to /wp-admin/admin-ajax.php
    • > Notice in wp-content/plugins/wpmdb/includes/class-wpmdb_donate.php+48
    Undefined index: status
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=wpmdb
    • > POST request to /wp-admin/admin-ajax.php
    • > Notice in wp-content/plugins/wpmdb/includes/class-wpmdb_donate.php+49
    Undefined index: token
    • > GET request to /wp-admin/options-general.php?page=wpmdb
    • > POST request to /wp-admin/admin-ajax.php
    • > Notice in wp-content/plugins/wpmdb/includes/class-wpmdb_donate.php+50
    Undefined index: page
    • > GET request to /wp-admin/options-general.php?page=wpmdb
    • > POST request to /wp-admin/admin-ajax.php
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method WPMDB_Ajax::search() should not be called statically
    • > GET request to /wp-admin/options-general.php?page=wpmdb
    • > POST request to /wp-admin/admin-ajax.php
    • > Notice in wp-content/plugins/wpmdb/includes/class-wpmdb_ajax.php+37
    Undefined index: id

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 take a closer look at the following
  • 15× PHP files perform the task of outputting text when accessed with GET requests (only 10 are shown):
    • > /wp-content/plugins/wpmdb/templates/index.php
    • > /wp-content/plugins/wpmdb/assets/index.php
    • > /wp-content/plugins/wpmdb/wpmdb.php
    • > /wp-content/plugins/wpmdb/includes/index.php
    • > /wp-content/plugins/wpmdb/includes/class-wpmdb.php
    • > /wp-content/plugins/wpmdb/assets/img/index.php
    • > /wp-content/plugins/wpmdb/languages/index.php
    • > /wp-content/plugins/wpmdb/includes/class-wpmdb_metabox.php
    • > /wp-content/plugins/wpmdb/templates/search_result.php
    • > /wp-content/plugins/wpmdb/assets/js/index.php

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 Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
1 plugin tags: imdb

wpmdb/wpmdb.php Passed 13 tests

The entry point to "WPMDB" version 1.0 is a PHP file that has certain tags in its header comment area
111 characters long description:
Get information from IMDB and set to your post, just active plugin, use shortcodes and enjoy from free deatils.

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 detected1,179 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
PHP10112161730
PO File16366176
LESS1220113
CSS10195
JavaScript17065

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity4.60
▷ Minimum class complexity1.00
▷ Maximum class complexity7.00
Average method complexity1.50
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods37
▷ Static methods2772.97%
▷ Public methods37100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions150.00%
▷ Anonymous functions150.00%
Constants9
▷ Global constants9100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
3 PNG files occupy 0.19MB with 0.11MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png119.98KB42.71KB▼ 64.40%
assets/img/coffee-cup.png5.10KB2.83KB▼ 44.62%
screenshot-1.png69.11KB26.78KB▼ 61.25%