84% tf-user-hub

Code Review | TF User Hub

WordPress plugin TF User Hub scored84%from 54 tests.

About plugin

  • Plugin page: tf-user-hub
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-4.5.3
  • WordPress version: 6.3.1
  • First release: Sep 16, 2015
  • Latest release: Aug 6, 2016
  • Number of updates: 6
  • Update frequency: every 54.0 days
  • Top authors: mmaumio (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

10+ active /731 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

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

Analyzing server-side resources used by TF User Hub
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0139.00 ▲1.84
Dashboard /wp-admin3.32 ▲0.0144.54 ▼14.71
Posts /wp-admin/edit.php3.37 ▲0.0143.84 ▼3.47
Add New Post /wp-admin/post-new.php5.90 ▲0.0180.58 ▼13.13
Media Library /wp-admin/upload.php3.24 ▲0.0133.56 ▲0.96

Server storage [IO: ▲0.12MB] [DB: ▲0.07MB] Passed 3 tests

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 8 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
widget_tf_user_hub
widget_theysaidso_widget
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for TF User Hub
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.33 ▼0.071.93 ▲0.2652.27 ▲15.72
Dashboard /wp-admin2,198 ▲245.59 ▲0.0184.04 ▼3.8739.16 ▼2.07
Posts /wp-admin/edit.php2,100 ▼32.01 ▼0.0134.98 ▼3.9333.81 ▲2.19
Add New Post /wp-admin/post-new.php1,526 ▼023.39 ▼0.33702.56 ▲43.2151.69 ▼3.33
Media Library /wp-admin/upload.php1,400 ▼04.19 ▼0.0797.81 ▼0.4042.23 ▼2.60

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • widget_tf_user_hub
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, this is by no means an exhaustive test

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 take a closer look at the following
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/tf-user-hub/inc/tu-shortcodes.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/tf-user-hub/inc/tu-widgets.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

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: themeforest, author, envato, user, themeforest-api

tf-user-hub/tf-user-hub.php 92% from 13 tests

The principal PHP file in "TF User Hub" v. 1.0 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Everything looks great! No dangerous files found in this plugin265 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP38685237
CSS27428

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.20
Average class complexity8.50
▷ Minimum class complexity7.00
▷ Maximum class complexity10.00
Average method complexity2.50
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods10
▷ Static methods110.00%
▷ Public methods10100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There are no PNG files in this plugin