58% fresh-connect

Code Review | Fresh Connect by Fresh Labs

WordPress plugin Fresh Connect by Fresh Labs scored58%from 54 tests.

About plugin

  • Plugin page: fresh-connect
  • Plugin version: 1.2.0
  • PHP compatiblity: 7.1+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.1-5.4
  • WordPress version: 6.3.1
  • First release: Jul 18, 2019
  • Latest release: Apr 10, 2020
  • Number of updates: 13
  • Update frequency: every 20.7 days
  • Top authors: careybaird (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /2,357 total downloads

Benchmarks

Plugin footprint 48% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.18MB] [CPU: ▼16.11ms] Passed 4 tests

A check of server-side resources used by Fresh Connect by Fresh Labs
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /4.30 ▲0.8345.26 ▲3.59
Dashboard /wp-admin4.17 ▲0.8751.77 ▼6.14
Posts /wp-admin/edit.php4.29 ▲0.9354.77 ▲6.53
Add New Post /wp-admin/post-new.php4.05 ▼1.8441.11 ▼59.19
Media Library /wp-admin/upload.php4.09 ▲0.8744.88 ▼2.71
Settings /wp-admin/admin.php?page=fresh-connect-settings4.0635.80
Install Plugins /wp-admin/plugins.php?page=tgmpa-install-plugins4.2036.15
Activity Log /wp-admin/admin.php?page=fresh-connect-activity-log4.0737.31
What is this? /wp-admin/admin.php?page=fresh-connect-aboutus4.0836.23
Connection Status /wp-admin/admin.php?page=fresh-connect-status4.0638.33

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 69 new files
Database: 3 new tables, 9 new options
New tables
wp_fresh_page_reports
wp_fresh_page_stats
wp_fresh_connect_requests_log
New WordPress options
fp_connection_keys
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
widget_recent-comments
fresh_connect_status
fresh_connect_help

Browser metrics Passed 4 tests

This is an overview of browser requirements for Fresh Connect by Fresh Labs
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,896 ▲13514.26 ▼0.091.65 ▼0.0941.57 ▼1.14
Dashboard /wp-admin2,291 ▲1115.93 ▲0.2497.93 ▲11.9486.32 ▲44.78
Posts /wp-admin/edit.php2,269 ▲1692.84 ▲0.8246.92 ▲12.2044.05 ▲6.46
Add New Post /wp-admin/post-new.php1,625 ▲9023.19 ▲4.82641.60 ▲43.33108.02 ▲31.68
Media Library /wp-admin/upload.php1,567 ▲1705.17 ▲0.97107.90 ▲5.7089.28 ▲42.85
Settings /wp-admin/admin.php?page=fresh-connect-settings9862.8035.5636.62
Install Plugins /wp-admin/plugins.php?page=tgmpa-install-plugins1,1242.5932.4138.07
Activity Log /wp-admin/admin.php?page=fresh-connect-activity-log9802.7838.0035.44
What is this? /wp-admin/admin.php?page=fresh-connect-aboutus1,1122.7734.7962.15
Connection Status /wp-admin/admin.php?page=fresh-connect-status9972.6036.2841.55

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • Incomplete uninstall procedure, leaving 69 files (0.74MB) in the plugin directory
    • (new file) inc/ClassFreshConnect.php
    • (new file) assets/images/icon2.png
    • (new file) inc/TGMLibrary/languages/tgmpa-cs_CZ.mo
    • (new file) assets/js/fp-admin.js
    • (new file) inc/Request.php
    • (new file) inc/Api.php
    • (new file) assets/images/icon3.png
    • (new file) assets/css/fp-admin.css
    • (new file) inc/TGMLibrary/class-tgm-plugin-activation.php
    • (new file) inc/AutoLogin.php
    • ...
  • Zombie tables detected upon uninstall: 3 tables
    • wp_fresh_connect_requests_log
    • wp_fresh_page_reports
    • wp_fresh_page_stats
  • Zombie WordPress options were found after uninstall: 9 options
    • widget_theysaidso_widget
    • can_compress_scripts
    • fresh_connect_help
    • theysaidso_admin_options
    • widget_recent-comments
    • fresh_connect_status
    • db_upgraded
    • widget_recent-posts
    • fp_connection_keys

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 0% 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
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/fresh-connect/page/info.php
  • 15× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'FastPress_Context' not found in wp-content/plugins/fresh-connect/inc/AutoLogin.php:306
    • > PHP Fatal error
      require_once(): Failed opening required 'FRESH_CONNECT_DIR_PATHinc/ClassFreshConnect.php' (include_path='.:/usr/share/php') in wp-content/plugins/fresh-connect/inc/loader.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/fresh-connect/init.php:16
    • > PHP Warning
      require_once(FRESH_CONNECT_DIR_PATHinc/ClassFreshConnect.php): failed to open stream: No such file or directory in wp-content/plugins/fresh-connect/inc/loader.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/fresh-connect/inc/ClassFreshConnect.php:18
    • > PHP Warning
      Use of undefined constant FRESH_CONNECT_PLUGIN_FILE_PATH - assumed 'FRESH_CONNECT_PLUGIN_FILE_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/fresh-connect/inc/ClassFreshConnect.php on line 13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function did_action() in wp-content/plugins/fresh-connect/inc/TGMLibrary/class-tgm-plugin-activation.php:2112
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/fresh-connect/page/templates/display_deactivation_popup.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_next_scheduled() in wp-content/plugins/fresh-connect/inc/freshGetdata.php:2
    • > PHP Warning
      Use of undefined constant FRESH_CONNECT_DIR_PATH - assumed 'FRESH_CONNECT_DIR_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/fresh-connect/inc/loader.php on line 2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 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
4 plugin tags: cloud hosting, wordpress, wordpress hosting, cloud

fresh-connect/init.php 85% from 13 tests

Analyzing the main PHP file in "Fresh Connect by Fresh Labs" version 1.2.0
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("fresh-connect.php" instead of "init.php")
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 183 characters long)

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
Success! There were no dangerous files found in this plugin9,719 lines of code in 45 files:
LanguageFilesBlank linesComment linesLines of code
PO File171,4491,9934,842
PHP261,2082,0814,732
CSS10292
JavaScript1162753

PHP code Passed 2 tests

A brief analysis 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.37
Average class complexity34.45
▷ Minimum class complexity1.00
▷ Maximum class complexity206.00
Average method complexity3.29
▷ Minimum method complexity1.00
▷ Maximum method complexity34.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes20
▷ Abstract classes00.00%
▷ Concrete classes20100.00%
▷ Final classes00.00%
Methods291
▷ Static methods62.06%
▷ Public methods24483.85%
▷ Protected methods3211.00%
▷ Private methods155.15%
Functions13
▷ Named functions1184.62%
▷ Anonymous functions215.38%
Constants34
▷ Global constants823.53%
▷ Class constants2676.47%
▷ Public constants26100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
2 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/icon2.png1.54KB0.60KB▼ 61.13%
assets/images/icon3.png1.53KB0.64KB▼ 58.09%