84% ourrootsdatabase

Code Review | OurRootsDatabase

WordPress plugin OurRootsDatabase scored84%from 54 tests.

About plugin

  • Plugin page: ourrootsdatabase
  • Plugin version: 1.0.18
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.7-6.1
  • WordPress version: 6.3.1
  • First release: Sep 18, 2021
  • Latest release: Dec 2, 2023
  • Number of updates: 11
  • Update frequency: every 73.3 days
  • Top authors: dallanq (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /496 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼4.27ms] Passed 4 tests

Analyzing server-side resources used by OurRootsDatabase
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0440.63 ▼2.33
Dashboard /wp-admin3.35 ▲0.0047.37 ▼11.83
Posts /wp-admin/edit.php3.40 ▲0.0447.57 ▼2.55
Add New Post /wp-admin/post-new.php5.93 ▲0.0482.84 ▼0.38
Media Library /wp-admin/upload.php3.27 ▲0.0434.30 ▲1.11

Server storage [IO: ▲2.31MB] [DB: ▲0.07MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 92 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
db_upgraded
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for OurRootsDatabase
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲4414.67 ▲0.311.67 ▲0.0143.91 ▲0.40
Dashboard /wp-admin2,214 ▲375.59 ▼0.0292.16 ▼5.3540.67 ▼0.32
Posts /wp-admin/edit.php2,116 ▲162.00 ▼0.0139.00 ▲2.1534.84 ▼3.47
Add New Post /wp-admin/post-new.php1,539 ▲1023.68 ▲0.44658.69 ▲45.8745.05 ▼4.49
Media Library /wp-admin/upload.php1,416 ▲224.22 ▼0.0796.66 ▼0.8440.88 ▼2.38

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not 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
Please fix the following items
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/ourrootsdatabase/ourroots.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ourrootsdatabase/includes/ourroots-class.php:9

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 93% 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
1 plugin tags: genealogy

ourrootsdatabase/ourroots.php 85% from 13 tests

The entry point to "OurRootsDatabase" version 1.0.18 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("ourrootsdatabase.php" instead of "ourroots.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Good job! No executable or dangerous file extensions detected486 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
CSS4147297
PHP21921178
JavaScript203111

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity23.00
▷ Minimum class complexity23.00
▷ Maximum class complexity23.00
Average method complexity3.75
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.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
40 PNG files occupy 0.04MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/seadragon/zoomout_rest.png0.46KB0.29KB▼ 35.55%
img/seadragon/fullpage_hover.png0.33KB0.20KB▼ 39.29%
img/seadragon/flip_rest.png4.80KB1.88KB▼ 60.98%
img/seadragon/zoomout_pressed.png0.46KB0.29KB▼ 36.36%
img/seadragon/button_rest.png1.04KB1.81KB0.00%