10% wpfrank-companion

Code Review | WPFrank Companion

WordPress plugin WPFrank Companion scored10%from 54 tests.

About plugin

  • Plugin page: wpfrank-companion
  • Plugin version: 0.3.0
  • PHP compatiblity: 4.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.3
  • WordPress version: 6.3.1
  • First release: Mar 10, 2021
  • Latest release: Nov 24, 2023
  • Number of updates: 44
  • Update frequency: every 22.6 days
  • Top authors: FARAZFRANK (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

3,000+ active /46,297 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
It is recommended to fix the following installer errors
  • This plugin did not install gracefully
    • > User deprecated in wp-includes/functions.php+5453
    Function get_page_by_title is deprecated since version 6.2.0! Use WP_Query instead.

Server metrics [RAM: ▲0.01MB] [CPU: ▼4.33ms] Passed 4 tests

Server-side resources used by WPFrank Companion
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0141.11 ▼1.06
Dashboard /wp-admin3.31 ▲0.0144.44 ▼5.50
Posts /wp-admin/edit.php3.37 ▲0.0147.75 ▼3.46
Add New Post /wp-admin/post-new.php5.89 ▲0.0191.88 ▼3.91
Media Library /wp-admin/upload.php3.24 ▲0.0133.69 ▼4.44

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 138 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
fresh_website_activate
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for WPFrank Companion
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,785 ▲2314.67 ▲0.431.60 ▼0.3533.99 ▼11.19
Dashboard /wp-admin2,195 ▲215.64 ▼0.0294.56 ▲5.8242.00 ▲3.16
Posts /wp-admin/edit.php2,109 ▲121.98 ▼0.0441.04 ▲4.4535.55 ▲1.33
Add New Post /wp-admin/post-new.php1,526 ▼15323.73 ▲1.71641.38 ▲10.0557.80 ▲11.03
Media Library /wp-admin/upload.php1,400 ▼04.06 ▼0.12114.89 ▲11.0241.19 ▼5.11

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • Zombie WordPress options were found after uninstall: 7 options
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • fresh_website_activate
    • 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
Everything seems fine, however 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 fix the following items
  • 21× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_theme_mod() in wp-content/plugins/wpfrank-companion/inc/cryptoairdrop/front-page/wpfrank-companion-cryptoairdrop-faq.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_theme_mod() in wp-content/plugins/wpfrank-companion/inc/businessexpo/front-page/wpfrank-companion-businessexpo-service.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_theme_mod() in wp-content/plugins/wpfrank-companion/inc/businessexpo/front-page/wpfrank-companion-businessexpo-slider.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wpfrank-companion/inc/businessexpo/customizer/hompage-layout/customizer_homepage_layout.php:107
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_theme_mod() in wp-content/plugins/wpfrank-companion/inc/cryptoairdrop/front-page/wpfrank-companion-cryptoairdrop-roadmap.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_theme_mod() in wp-content/plugins/wpfrank-companion/inc/cryptoairdrop/front-page/wpfrank-companion-cryptoairdrop-contact.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_theme_mod() in wp-content/plugins/wpfrank-companion/inc/businessexpo/front-page/wpfrank-companion-businessexpo-sponsors.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wpfrank-companion/inc/businessexpo/customizer/businessexpo-default-data/funfact-customizer-default-data.php:33
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_theme_mod() in wp-content/plugins/wpfrank-companion/inc/businessexpo/front-page/wpfrank-companion-businessexpo-team.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_theme_mod() in wp-content/plugins/wpfrank-companion/inc/cryptoairdrop/front-page/wpfrank-companion-cryptoairdrop-feature.php:8

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)
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that need to be fixed:
  • Tags: You are using too many tags: 11 tag instead of maximum 10
Please take inspiration from this readme.txt

wpfrank-companion/wpfrank-companion.php Passed 13 tests

The entry point to "WPFrank Companion" version 0.3.0 is a PHP file that has certain tags in its header comment area
71 characters long description:
WPFrank Companion plugin provides themes extra settings for front page.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected7,950 lines of code in 64 files:
LanguageFilesBlank linesComment linesLines of code
PHP648217637,950

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity1.52
▷ Minimum class complexity1.00
▷ Maximum class complexity7.00
Average method complexity1.52
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes27
▷ Abstract classes00.00%
▷ Concrete classes27100.00%
▷ Final classes00.00%
Methods27
▷ Static methods13.70%
▷ Public methods27100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions48
▷ Named functions48100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
37 PNG files occupy 3.89MB with 2.08MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
inc/businessexpo/img/icons/right-sidebar.png11.69KB5.84KB▼ 50.03%
inc/cryptoairdrop/img/bnb.png1.23KB1.23KB0.00%
inc/cryptoairdrop/img/faq.png212.64KB52.83KB▼ 75.16%
inc/cryptoairdrop/img/currency.png39.47KB14.31KB▼ 63.73%
inc/cryptoairdrop/img/about.png384.80KB83.21KB▼ 78.38%