10% awp-companion

Code Review | A WP Life Companion

WordPress plugin A WP Life Companion scored10%from 54 tests.

About plugin

  • Plugin page: awp-companion
  • Plugin version: 1.3.6
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-6.2
  • WordPress version: 6.3.1
  • First release: Dec 8, 2020
  • Latest release: Sep 25, 2023
  • Number of updates: 40
  • Update frequency: every 25.5 days
  • Top authors: awordpresslife (100%)

Code review

54 tests

User reviews

1 review

Install metrics

6,000+ active /77,842 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
  • Install procedure validation failed for this plugin
    • > 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: ▼9.32ms] Passed 4 tests

This is a short check of server-side resources used by A WP Life Companion
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0032.50 ▼9.45
Dashboard /wp-admin3.33 ▼0.0248.12 ▼18.09
Posts /wp-admin/edit.php3.38 ▲0.0248.69 ▼4.98
Add New Post /wp-admin/post-new.php5.91 ▲0.0289.22 ▼4.76
Media Library /wp-admin/upload.php3.25 ▲0.0234.32 ▼0.43

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for A WP Life Companion
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,761 ▼014.49 ▼0.121.74 ▲0.058.54 ▼33.39
Dashboard /wp-admin2,224 ▲215.85 ▼0.00100.68 ▼0.3939.66 ▼0.41
Posts /wp-admin/edit.php2,109 ▲92.04 ▲0.0434.23 ▼7.0638.58 ▼1.82
Add New Post /wp-admin/post-new.php1,545 ▼923.37 ▲0.44670.90 ▲21.1463.43 ▲10.11
Media Library /wp-admin/upload.php1,397 ▼34.30 ▲0.0893.28 ▼11.7643.07 ▼1.90

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • This plugin does not fully uninstall, leaving 7 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • fresh_website_activate

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
Good news, no errors were detected

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
Please fix the following items
  • 24× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Notice
      Undefined variable: activate_theme in wp-content/plugins/awp-companion/inc/awpbusinesspress/front-page/awp-companion-awpbusinesspress-sponsors.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_theme_mod() in wp-content/plugins/awp-companion/inc/awpbusinesspress/front-page/awp-companion-awpbusinesspress-sponsors.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_theme_mod() in wp-content/plugins/awp-companion/inc/awpbusinesspress/front-page/awp-companion-awpbusinesspress-testimonial.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_theme_mod() in wp-content/plugins/awp-companion/inc/awpbusinesspress/front-page/awp-companion-awpbusinesspress-service.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_theme_mod() in wp-content/plugins/awp-companion/inc/formula/front-page/awp-companion-formula-portfolio.php:2
    • > PHP Notice
      Undefined variable: activate_theme in wp-content/plugins/awp-companion/inc/awpbusinesspress/front-page/awp-companion-awpbusinesspress-sponsors.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_theme_mod() in wp-content/plugins/awp-companion/inc/formula/front-page/awp-companion-formula-blog.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_theme_mod() in wp-content/plugins/awp-companion/inc/formula/front-page/awp-companion-formula-slider.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_theme_mod() in wp-content/plugins/awp-companion/inc/awpbusinesspress/front-page/awp-companion-awpbusinesspress-blog.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_get_theme() in wp-content/plugins/awp-companion/inc/formula/front-page/awp-companion-formula-testimonial.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
9 plugin tags: homepage, admin, themepage, widgets, featured...

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

The entry point to "A WP Life Companion" version 1.3.6 is a PHP file that has certain tags in its header comment area
95 characters long description:
A WP Life Themes Companion plugin provides awordpresslife themes extra settings for front page.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Success! There were no dangerous files found in this plugin25,962 lines of code in 80 files:
LanguageFilesBlank linesComment linesLines of code
XML726747814,767
PHP731,01689611,195

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity1.30
▷ Minimum class complexity1.00
▷ Maximum class complexity5.00
Average method complexity1.30
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes23
▷ Abstract classes00.00%
▷ Concrete classes23100.00%
▷ Final classes00.00%
Methods23
▷ Static methods14.35%
▷ Public methods23100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions182
▷ Named functions182100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
53 compressed PNG files occupy 3.87MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
inc/formula/demo-content/education/thumb.png247.21KB248.55KB0.00%
inc/formula/img/service/mf2.png18.07KB19.18KB0.00%
inc/formula/demo-content/medical/thumb.png287.63KB289.91KB0.00%
inc/formula/img/team/team-2.png14.64KB14.63KB0.06%
inc/formula/img/client/partner-6.png0.75KB0.79KB0.00%