78% explore-wp-database

Code Review | Explore Wp Database

WordPress plugin Explore Wp Database scored 78% from 54 tests.

About plugin

  • Plugin page: explore-wp-database
  • Plugin version: 0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-4.9
  • WordPress version: 6.3.1
  • First release: Jul 27, 2018
  • Latest release: Jul 27, 2018
  • Number of updates: 2
  • Update frequency: every 1.0 days
  • Top authors: mihai90 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 605 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: ▼2.42ms] Passed 4 tests

An overview of server-side resources used by Explore Wp Database
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0138.01 ▼0.17
Dashboard /wp-admin3.31 ▲0.0147.49 ▼4.45
Posts /wp-admin/edit.php3.36 ▲0.0146.75 ▼1.30
Add New Post /wp-admin/post-new.php5.89 ▲0.0193.28 ▲5.13
Media Library /wp-admin/upload.php3.23 ▲0.0133.50 ▼3.76

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 18 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

Explore Wp Database: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,818 ▲6113.53 ▼1.021.82 ▼0.1644.50 ▼5.48
Dashboard /wp-admin2,221 ▲365.78 ▼0.1199.17 ▼16.5141.40 ▼5.51
Posts /wp-admin/edit.php2,107 ▲152.17 ▲0.1840.35 ▼5.1435.69 ▼0.10
Add New Post /wp-admin/post-new.php1,682 ▲16822.64 ▲4.90642.16 ▼57.0748.76 ▼6.90
Media Library /wp-admin/upload.php1,403 ▲154.21 ▼0.0298.93 ▼6.5545.74 ▼0.52

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
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 0% 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 items
  • 2× PHP files output text when accessed directly:
    • > /wp-content/plugins/explore-wp-database/views/all-tables.php
    • > /wp-content/plugins/explore-wp-database/views/single-table.php
  • 5× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Notice
      Undefined variable: pagination in wp-content/plugins/explore-wp-database/views/single-table.php on line 27
    • > PHP Notice
      Undefined variable: tableName in wp-content/plugins/explore-wp-database/views/single-table.php on line 1
    • > PHP Notice
      Undefined variable: items in wp-content/plugins/explore-wp-database/views/all-tables.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/explore-wp-database/explore_wp_database.php:16
    • > PHP Notice
      Undefined variable: tableDescription in wp-content/plugins/explore-wp-database/views/single-table.php on line 3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need your attention:
  • Donate link: Invalid URI found ("")
The official readme.txt is a good inspiration

explore-wp-database/explore_wp_database.php 92% from 13 tests

The main PHP file in "Explore Wp Database" ver. 0.2 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Main file name: The principal plugin file should be the same as the plugin slug ("explore-wp-database.php" instead of "explore_wp_database.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
Good job! No executable or dangerous file extensions detected312 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
PHP143438311
CSS1051

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity5.29
▷ Minimum class complexity1.00
▷ Maximum class complexity23.00
Average method complexity2.67
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces2
Interfaces1
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods20
▷ Static methods630.00%
▷ Public methods20100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions133.33%
▷ Anonymous functions266.67%
Constants2
▷ Global constants2100.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
1 PNG file occupies 0.18MB with 0.13MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
Screen Shot 2018-07-23 at 20.35.13.png189.02KB51.30KB▼ 72.86%