84% wishful-companion

Code Review | Wishful Companion

WordPress plugin Wishful Companion scored84%from 54 tests.

About plugin

  • Plugin page: wishful-companion
  • Plugin version: 1.0.8
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3.0-5.4
  • WordPress version: 6.3.1
  • First release: Jan 7, 2020
  • Latest release: Dec 3, 2020
  • Number of updates: 18
  • Update frequency: every 18.4 days
  • Top authors: wishfulthemes (100%)

Code review

54 tests

User reviews

1 review

Install metrics

700+ active /9,924 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.11MB] [CPU: ▼6.83ms] Passed 4 tests

A check of server-side resources used by Wishful Companion
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.1135.16 ▼9.09
Dashboard /wp-admin3.42 ▲0.1147.49 ▼2.51
Posts /wp-admin/edit.php3.53 ▲0.1744.76 ▼2.97
Add New Post /wp-admin/post-new.php6.00 ▲0.1182.90 ▼12.76
Media Library /wp-admin/upload.php3.34 ▲0.1135.06 ▲1.96

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 59 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
db_upgraded
widget_recent-comments
wishful_blog_plugin_do_activation_redirect
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Wishful Companion
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.27 ▼1.021.84 ▼0.3843.75 ▼0.58
Dashboard /wp-admin2,206 ▲185.86 ▲1.01103.83 ▼14.0540.16 ▼8.45
Posts /wp-admin/edit.php2,089 ▲32.01 ▼0.0333.83 ▼2.2534.25 ▲0.28
Add New Post /wp-admin/post-new.php1,533 ▼323.53 ▲0.31676.95 ▼48.0354.66 ▼5.43
Media Library /wp-admin/upload.php1,391 ▲64.28 ▲0.0498.61 ▼0.4740.64 ▼1.28

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 7 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • wishful_blog_plugin_do_activation_redirect
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts

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 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following
  • 3× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Warning
      Use of undefined constant WISHFUL_COMPANION_PATH - assumed 'WISHFUL_COMPANION_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/wishful-companion/inc/init.php on line 30
    • > PHP Warning
      require_once(WISHFUL_COMPANION_PATHinc/functions.php): failed to open stream: No such file or directory in wp-content/plugins/wishful-companion/inc/init.php on line 30
    • > PHP Fatal error
      require_once(): Failed opening required 'WISHFUL_COMPANION_PATHinc/functions.php' (include_path='.:/usr/share/php') in wp-content/plugins/wishful-companion/inc/init.php on line 30

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 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
5 plugin tags: shortcodes, elementor, widgets, import, demo

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

"Wishful Companion" version 1.0.8's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please take the time to fix the following:
  • Requires at least: Required version must match the one declared in readme.txt ("4.4" instead of "3.3.0")

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
No dangerous file extensions were detected15,515 lines of code in 49 files:
LanguageFilesBlank linesComment linesLines of code
XML12174148,066
PHP171,0329164,467
CSS6284152,232
JavaScript417289729
JSON210021

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.38
Average class complexity39.81
▷ Minimum class complexity3.00
▷ Maximum class complexity186.00
Average method complexity5.85
▷ Minimum method complexity1.00
▷ Maximum method complexity50.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes16
▷ Abstract classes00.00%
▷ Concrete classes16100.00%
▷ Final classes00.00%
Methods128
▷ Static methods2116.41%
▷ Public methods11992.97%
▷ Protected methods21.56%
▷ Private methods75.47%
Functions21
▷ Named functions21100.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants7100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
6 compressed PNG files occupy 1.05MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
inc/demo/raise-mag/demo-one/screenshot.png254.40KB278.28KB0.00%
includes/wizard/assets/img/start.png59.89KB19.51KB▼ 67.42%
inc/demo/raise-mag/demo-two/screenshot.png237.74KB259.67KB0.00%
inc/demo/raise-mag/demo-three/screenshot.png191.28KB207.71KB0.00%
inc/demo/trending-mag/demo-one/screenshot.png255.30KB280.12KB0.00%