10% rootspersona

Code Review | Rootspersona

WordPress plugin Rootspersona scored10%from 54 tests.

About plugin

  • Plugin page: rootspersona
  • Plugin version: 3.7.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-6.0
  • WordPress version: 6.3.1
  • First release: Jan 19, 2011
  • Latest release: Jan 28, 2023
  • Number of updates: 530
  • Update frequency: every 8.3 days
  • Top authors: ed4becky (100%)

Code review

54 tests

User reviews

17 reviews

Install metrics

700+ active /31,296 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Please fix the following installer errors
  • The plugin cannot be installed
    • > Notice in wp-content/plugins/rootspersona/php/class-RP-Persona-Installer.php+180
    Trying to get property 'post_page' of non-object

Server metrics [RAM: ▲2.82MB] [CPU: ▲12.74ms] Passed 4 tests

Server-side resources used by Rootspersona
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /6.40 ▲2.9365.88 ▲20.95
Dashboard /wp-admin6.12 ▲2.8170.30 ▲7.01
Posts /wp-admin/edit.php6.16 ▲2.7967.66 ▲14.41
Add New Post /wp-admin/post-new.php8.91 ▲3.02110.86 ▲8.57
Media Library /wp-admin/upload.php5.98 ▲2.7561.05 ▲24.30

Server storage [IO: ▲1.74MB] [DB: ▲0.03MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 191 new files
Database: 31 new tables, 8 new options
New tables
wp_rp_source_cite
wp_rp_repo_note
wp_rp_indi_seq
wp_rp_name_name
wp_rp_fam_event
wp_rp_fam_note
wp_rp_indi_event
wp_rp_indi_fam
wp_rp_fam_child
wp_rp_indi_cite
...
New WordPress options
widget_recent-posts
db_upgraded
can_compress_scripts
widget_theysaidso_widget
persona_plugin
theysaidso_admin_options
widget_rp_surname_widget
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Rootspersona
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,326 ▲56515.38 ▲1.1015.23 ▲13.5044.43 ▼0.50
Dashboard /wp-admin2,345 ▲1685.26 ▼0.3294.20 ▼8.7539.24 ▼4.55
Posts /wp-admin/edit.php2,267 ▲1672.72 ▲0.7042.40 ▲2.8430.21 ▼5.78
Add New Post /wp-admin/post-new.php1,766 ▲23822.80 ▼0.44761.81 ▲115.9539.95 ▼33.07
Media Library /wp-admin/upload.php1,560 ▲1605.06 ▲0.79108.73 ▲4.3642.30 ▼3.22

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • The plugin did not uninstall gracefully
    • > Notice in wp-content/plugins/rootspersona/php/class-RP-Persona-Installer.php+238
    Trying to get property 'post_page' of non-object
  • The uninstall procedure has failed, leaving 7 options in the database
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_rp_surname_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
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 take a closer look at the following
  • 89× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Warning
      Use of undefined constant WP_PLUGIN_DIR - assumed 'WP_PLUGIN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/rootspersona/php/dao/dao/class-RP-DAO-Factory.php on line 2
    • > PHP Fatal error
      Uncaught Error: Class 'Rp_Mysql_DAO' not found in wp-content/plugins/rootspersona/php/dao/mysql/class-RP-Address-Mysql-DAO.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'Rp_Mysql_DAO' not found in wp-content/plugins/rootspersona/php/dao/mysql/class-RP-Persona-Mysql-DAO.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'RP_Entity_Abstract' not found in wp-content/plugins/rootspersona/php/Genealogy/Gedcom/Structures/class-RP-Personal-Name.php:26
    • > PHP Fatal error
      require_once(): Failed opening required 'WP_PLUGIN_DIR/rootspersona/php/class-RP-Table-Creator.php' (include_path='.:/usr/share/php') in wp-content/plugins/rootspersona/php/class-RP-Persona-Site-Mender.php on line 2
    • > PHP Fatal error
      Uncaught Error: Class 'RP_Entity_Abstract' not found in wp-content/plugins/rootspersona/php/Genealogy/Gedcom/Structures/class-RP-Character-Set.php:26
    • > PHP Fatal error
      Uncaught Error: Class 'Rp_Mysql_DAO' not found in wp-content/plugins/rootspersona/php/dao/mysql/class-RP-Event-Note-Mysql-DAO.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'Rp_Mysql_DAO' not found in wp-content/plugins/rootspersona/php/dao/mysql/class-RP-Name-Personal-Mysql-DAO.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'RP_Entity_Abstract' not found in wp-content/plugins/rootspersona/php/Genealogy/Gedcom/Structures/class-RP-Lds-Ordinance.php:26
    • > PHP Fatal error
      Uncaught Error: Class 'Rp_Mysql_DAO' not found in wp-content/plugins/rootspersona/php/dao/mysql/class-RP-Fam-Event-Mysql-DAO.php:9

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: These screenshots require images: #1 (Formatted persona screen), #2 (Formatted Family Sheets), #3 (Per page privacy settings and pictures, now integrated with the WordPress Media Picker), #4 (Variety of tools for managing persona pages), #5 (Lots of options for customization)
You can take inspiration from this readme.txt

rootspersona/rootspersona.php 92% from 13 tests

The main file in "Rootspersona" v. 3.7.5 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
  • Domain Path: The domain path folder was not found ("/rootspersona/localization")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin21,117 lines of code in 159 files:
LanguageFilesBlank linesComment linesLines of code
PHP1381,4825,88812,961
JavaScript83239335,390
PO File48141,1331,900
CSS67225449
SQL3331417

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity14.92
▷ Minimum class complexity1.00
▷ Maximum class complexity139.00
Average method complexity3.99
▷ Minimum method complexity1.00
▷ Maximum method complexity82.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes137
▷ Abstract classes32.19%
▷ Concrete classes13497.81%
▷ Final classes00.00%
Methods638
▷ Static methods7010.97%
▷ Public methods57189.50%
▷ Protected methods487.52%
▷ Private methods192.98%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants112
▷ Global constants32.68%
▷ Class constants10997.32%
▷ Public constants109100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
9 PNG files occupy 0.24MB with 0.07MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/delete-icon-hover.png1.77KB1.47KB▼ 16.53%
images/delete-icon-click.png1.24KB1.22KB▼ 1.58%
assets/banner-772x250.png42.23KB16.18KB▼ 61.67%
images/edit-icon.png1.31KB1.49KB0.00%
assets/icon-128x128.png13.00KB5.58KB▼ 57.04%