58% fb-page-attributes-wp-menu

Code Review | FB Page Attributes WP Menu

WordPress plugin FB Page Attributes WP Menu scored58%from 54 tests.

About plugin

  • Plugin page: fb-page-attribute...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9.2-4.9.7
  • WordPress version: 6.3.1
  • First release: Jul 6, 2018
  • Latest release: Jul 6, 2018
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: fatbeehive (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /717 total downloads

Benchmarks

Plugin footprint 48% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼0.77MB] [CPU: ▼35.97ms] Passed 4 tests

An overview of server-side resources used by FB Page Attributes WP Menu
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.60 ▲0.1439.62 ▲0.80
Dashboard /wp-admin3.18 ▼0.1722.80 ▼36.91
Posts /wp-admin/edit.php3.18 ▼0.1828.07 ▼19.20
Add New Post /wp-admin/post-new.php3.18 ▼2.7125.61 ▼75.69
Media Library /wp-admin/upload.php3.18 ▼0.0522.81 ▼12.06
Menu Sync Settings /wp-admin/themes.php?page=fb-page-attributes-menu-options3.1824.66

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 11 new files
Database: 1 new table, 7 new options
New tables
wp_sync_permalink_history
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
fb_page_attributes_db_version
widget_recent-posts
widget_recent-comments
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by FB Page Attributes WP Menu
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,829 ▲5814.74 ▲0.361.98 ▲0.1040.82 ▲0.88
Dashboard /wp-admin2,210 ▲225.83 ▲0.9898.47 ▼3.9937.38 ▼4.85
Posts /wp-admin/edit.php2,093 ▲42.04 ▲0.0439.81 ▲4.4133.76 ▼1.36
Add New Post /wp-admin/post-new.php1,517 ▼717.72 ▼5.44746.88 ▲129.4250.10 ▲0.66
Media Library /wp-admin/upload.php1,392 ▲44.22 ▲0.0494.39 ▼0.5140.31 ▼1.30
Menu Sync Settings /wp-admin/themes.php?page=fb-page-attributes-menu-options7762.0325.9423.58

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • Uninstall procedure validation failed for this plugin
    • > User notice in wp-includes/functions.php+5905
    Function add_submenu_page was called incorrectly. The seventh parameter passed to add_submenu_page() should be numeric representing menu position. Please see Debugging in WordPress for more information. (This message was added in version 5.3.0.)
  • Zombie tables were found after uninstall: 1 table
    • wp_sync_permalink_history
  • This plugin does not fully uninstall, leaving 7 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • fb_page_attributes_db_version
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These errors were triggered by the plugin
    • > GET request to /wp-admin/themes.php?page=fb-page-attributes-menu-options
    • > User notice in wp-includes/functions.php+5905
    Function add_submenu_page was called incorrectly. The seventh parameter passed to add_submenu_page() should be numeric representing menu position. Please see Debugging in WordPress for more information. (This message was added in version 5.3.0.)
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/themes.php?page=fb-page-attributes-menu-options
    • > Notice in wp-content/plugins/fb-page-attributes-wp-menu/classes/class-fb-page-attributes-admin.php+113
    Undefined index: action

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Almost there! Just fix the following items
  • 10× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/fb-page-attributes-wp-menu/classes/adminpages/class-fb-page-attributes-admin-options.php
    • > /wp-content/plugins/fb-page-attributes-wp-menu/classes/install/class-fb-page-attributes-menu-install.php
    • > /wp-content/plugins/fb-page-attributes-wp-menu/classes/class-fb-page-attributes.php
    • > /wp-content/plugins/fb-page-attributes-wp-menu/classes/uninstall/class-fb-page-attributes-menu-uninstall.php
    • > /wp-content/plugins/fb-page-attributes-wp-menu/fb-page-attributes-wp-menu.php
    • > /wp-content/plugins/fb-page-attributes-wp-menu/classes/class-fb-page-attributes-admin.php
    • > /wp-content/plugins/fb-page-attributes-wp-menu/classes/class-fb-page-attributes-permalinks-history.php
    • > /wp-content/plugins/fb-page-attributes-wp-menu/classes/class-fb-page-attributes-wp-menu-sync-to-menu.php
    • > /wp-content/plugins/fb-page-attributes-wp-menu/classes/class-fb-page-attributes-wp-menu-sync-to-page.php
    • > /wp-content/plugins/fb-page-attributes-wp-menu/classes/adminpages/class-fb-page-attributes-admin-redirects.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that require attention:
  • Plugin Name: You should set the name of your plugin on the first line ( === fb-page-attributes-wp-menu === )
The official readme.txt might help

fb-page-attributes-wp-menu/fb-page-attributes-wp-menu.php Passed 13 tests

The entry point to "FB Page Attributes WP Menu" version 1.0 is a PHP file that has certain tags in its header comment area
86 characters long description:
Automatically keep the page parent structure from page attributes in sync with a menu.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin742 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP10188500742

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.47
Average class complexity13.40
▷ Minimum class complexity1.00
▷ Maximum class complexity62.00
Average method complexity3.30
▷ Minimum method complexity1.00
▷ Maximum method complexity48.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes10
▷ Abstract classes00.00%
▷ Concrete classes10100.00%
▷ Final classes00.00%
Methods54
▷ Static methods712.96%
▷ Public methods4175.93%
▷ Protected methods1222.22%
▷ Private methods11.85%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
No PNG files were detected