84% database-analyzer

Code Review | Database Analyzer

WordPress plugin Database Analyzer scored84%from 54 tests.

About plugin

  • Plugin page: database-analyzer
  • Plugin version: 1.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.3
  • WordPress version: 6.3.1
  • First release: Mar 8, 2020
  • Latest release: Mar 9, 2020
  • Number of updates: 5
  • Update frequency: every 2.0 days
  • Top authors: joelmasci (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /503 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▲0.07MB] [CPU: ▼3.86ms] Passed 4 tests

Server-side resources used by Database Analyzer
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0637.29 ▼3.75
Dashboard /wp-admin3.37 ▲0.0755.02 ▲7.72
Posts /wp-admin/edit.php3.49 ▲0.1352.08 ▼3.19
Add New Post /wp-admin/post-new.php5.95 ▲0.07101.87 ▼2.10
Media Library /wp-admin/upload.php3.30 ▲0.0733.05 ▼6.40

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 39 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Database Analyzer
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,801 ▲4014.28 ▼0.011.69 ▲0.0745.16 ▼2.41
Dashboard /wp-admin2,210 ▲305.63 ▼0.0182.25 ▼6.5340.65 ▲2.45
Posts /wp-admin/edit.php2,112 ▲122.01 ▲0.0439.00 ▼2.2437.28 ▲1.18
Add New Post /wp-admin/post-new.php1,538 ▲323.11 ▲4.89613.69 ▼35.3250.99 ▼38.43
Media Library /wp-admin/upload.php1,412 ▲94.24 ▼0.0099.72 ▼6.0041.88 ▼5.06

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts

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 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
  • 3× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Trait 'JMasci\\HtmlTable\\T_Filters' not found in wp-content/plugins/database-analyzer/vendor/jmasci/html-table/src/Table.php on line 15
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/database-analyzer/vendor/jmasci/matrix-builder/tests/MatrixTest.php:7
    • > PHP Fatal error
      Uncaught Error: Interface 'JMasci\\ComponentTemplate\\I_Component' not found in wp-content/plugins/database-analyzer/vendor/jmasci/component-template/src/Component.php:9

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
4 plugin tags: reports, metrics, developer, database

database-analyzer/database-analyzer.php 92% from 13 tests

The primary PHP file in "Database Analyzer" version 1.0 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Domain Path: The domain path points to a folder that does not exist ("/languages")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Success! There were no dangerous files found in this plugin2,434 lines of code in 50 files:
LanguageFilesBlank linesComment linesLines of code
PHP296911,1411,857
Markdown61010289
JSON800216
Sass311141
CSS281420
XML1007
JavaScript1034

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity10.26
▷ Minimum class complexity1.00
▷ Maximum class complexity44.00
Average method complexity2.31
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces6
Interfaces1
Traits2
Classes16
▷ Abstract classes00.00%
▷ Concrete classes16100.00%
▷ Final classes00.00%
Methods127
▷ Static methods4333.86%
▷ Public methods12396.85%
▷ Protected methods00.00%
▷ Private methods43.15%
Functions76
▷ Named functions79.21%
▷ Anonymous functions6990.79%
Constants13
▷ Global constants215.38%
▷ Class constants1184.62%
▷ Public constants11100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG files were detected