10% beastthemes-companion

Code Review | Beastthemes Companion

WordPress plugin Beastthemes Companion scored10%from 54 tests.

About plugin

  • Plugin page: beastthemes-compa...
  • Plugin version: 1.0.14
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.0.2
  • WordPress version: 6.3.1
  • First release: Dec 22, 2020
  • Latest release: Oct 9, 2022
  • Number of updates: 44
  • Update frequency: every 14.9 days
  • Top authors: beastthemes (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /4,368 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
Please fix the following installer errors
  • The plugin did not install without errors
    • > 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.08MB] [CPU: ▼2.31ms] Passed 4 tests

A check of server-side resources used by Beastthemes Companion
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0941.47 ▲1.85
Dashboard /wp-admin3.39 ▲0.0846.58 ▲0.18
Posts /wp-admin/edit.php3.51 ▲0.1549.71 ▲3.16
Add New Post /wp-admin/post-new.php5.97 ▲0.0881.15 ▼14.02
Media Library /wp-admin/upload.php3.31 ▲0.0836.16 ▲2.76

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 73 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
widget_recent-comments
can_compress_scripts
db_upgraded
beastthemes_front_page
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for Beastthemes Companion
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,775 ▲4014.76 ▲0.511.75 ▲0.0637.19 ▼4.75
Dashboard /wp-admin2,203 ▲175.77 ▲0.8496.12 ▼7.3640.11 ▼2.34
Posts /wp-admin/edit.php2,101 ▲152.02 ▼0.0339.13 ▲3.7135.70 ▲1.51
Add New Post /wp-admin/post-new.php1,546 ▲1318.89 ▼4.39589.80 ▼84.3080.19 ▲16.99
Media Library /wp-admin/upload.php1,391 ▲94.26 ▲0.1295.56 ▼2.1042.85 ▼0.38

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • This plugin does not fully uninstall, leaving 7 options in the database
    • beastthemes_front_page
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting 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
  • 4× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/beastthemes-companion/admin/includes/controllers/dcode/home-template.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_die() in wp-content/plugins/beastthemes-companion/admin/includes/controllers/dcode/home-default.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_die() in wp-content/plugins/beastthemes-companion/admin/includes/controllers/yuno/home-default.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_die() in wp-content/plugins/beastthemes-companion/admin/includes/controllers/dcode/class-page-template.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
4 plugin tags: drag, beastthemes companion, builder, drop

beastthemes-companion/beastthemes-companion.php 92% from 13 tests

The principal PHP file in "Beastthemes Companion" v. 1.0.14 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Text Domain: The text domain name should consist of only dashes and lowercase characters

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
Good job! No executable or dangerous file extensions detected7,074 lines of code in 54 files:
LanguageFilesBlank linesComment linesLines of code
PHP385778894,661
CSS6347942,114
JavaScript105755299

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity7.70
▷ Minimum class complexity1.00
▷ Maximum class complexity25.00
Average method complexity5.07
▷ Minimum method complexity1.00
▷ Maximum method complexity25.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes37
▷ Abstract classes00.00%
▷ Concrete classes37100.00%
▷ Final classes12.70%
Methods61
▷ Static methods4472.13%
▷ Public methods5691.80%
▷ Protected methods11.64%
▷ Private methods46.56%
Functions39
▷ Named functions39100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
11 PNG files occupy 2.35MB with 1.84MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/dcode/clients/client_1.png22.46KB4.50KB▼ 79.98%
admin/assets/images/backgrounds/3.png495.52KB165.79KB▼ 66.54%
assets/images/dcode/clients/client_3.png22.67KB4.42KB▼ 80.49%
assets/images/dcode/clients/client_4.png20.82KB3.92KB▼ 81.17%
assets/images/team-bg.png11.02KB1.83KB▼ 83.41%