58% team-118group-agent

Code Review | Team 118GROUP Agent

WordPress plugin Team 118GROUP Agent scored 58% from 54 tests.

About plugin

  • Plugin page: team-118group-agent
  • Plugin version: 1.6.0
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.3.2
  • WordPress version: 6.3.1
  • First release: Jul 29, 2019
  • Latest release: Feb 21, 2020
  • Number of updates: 35
  • Update frequency: every 5.9 days
  • Top authors: 118group (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,311 total downloads

Benchmarks

Plugin footprint 48% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▼0.86MB] [CPU: ▼32.68ms] Passed 4 tests

Server-side resources used by Team 118GROUP Agent
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.60 ▲0.1445.03 ▲4.92
Dashboard /wp-admin3.08 ▼0.2224.58 ▼25.81
Posts /wp-admin/edit.php3.08 ▼0.2727.52 ▼25.83
Add New Post /wp-admin/post-new.php3.08 ▼2.8026.90 ▼70.02
Media Library /wp-admin/upload.php3.08 ▼0.1528.13 ▼9.04
404 /wp-admin/admin.php?page=wtf_118_4043.0823.84
General /wp-admin/admin.php?page=wtf_118_general3.0823.80

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 19 new files
Database: 1 new table, 6 new options
New tables
wp_wtf_404_log
New WordPress options
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by Team 118GROUP Agent
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,405 ▲67016.66 ▲1.9117.73 ▲16.0942.38 ▼0.48
Dashboard /wp-admin2,464 ▲2766.46 ▲1.56111.07 ▲3.3783.14 ▲43.38
Posts /wp-admin/edit.php2,283 ▲1973.35 ▲1.3447.38 ▲10.0384.97 ▲53.28
Add New Post /wp-admin/post-new.php1,699 ▲16624.56 ▲1.33602.26 ▼17.3237.36 ▼27.43
Media Library /wp-admin/upload.php1,423 ▲354.17 ▼0.0579.83 ▼21.6190.60 ▲46.75
404 /wp-admin/admin.php?page=wtf_118_4041,1613.0137.13117.87
General /wp-admin/admin.php?page=wtf_118_general1,0883.1037.7678.34

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • Uninstall procedure had uncaught errors
    • > Notice in wp-content/plugins/team-118group-agent/modules/settings.php+7
    Undefined variable: locale_taro
  • This plugin does not fully uninstall, leaving 1 table in the database
    • wp_wtf_404_log
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
These errors were triggered by the plugin
  • 12 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wtf_118_general
    • > Notice in wp-content/plugins/team-118group-agent/modules/settings.php+9
    Undefined variable: locale_taro
    • > GET request to /wp-admin/admin.php?page=wtf_118_404
    • > Notice in wp-content/plugins/team-118group-agent/modules/settings.php+51
    Undefined index: url2redirect
    • > GET request to /wp-admin/admin.php?page=wtf_118_404
    • > Notice in wp-content/plugins/team-118group-agent/modules/settings.php+71
    Undefined variable: msg
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wtf_118_404
    • > Notice in wp-content/plugins/team-118group-agent/modules/settings.php+133
    Undefined index: url_search

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 take a closer look at the following
  • 6× 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/team-118group-agent/modules/shortcodes.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/team-118group-agent/modules/scripts.php:65
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/team-118group-agent/modules/ajax.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_Action() in wp-content/plugins/team-118group-agent/modules/hooks.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_Action() in wp-content/plugins/team-118group-agent/modules/hooks.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/team-118group-agent/modules/settings.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Please fix the following attributes:
  • Contributors: Contributors not specified
You can look at the official readme.txt

team-118group-agent/wp-tga-filter.php 92% from 13 tests

"Team 118GROUP Agent" version 1.6.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
You should first fix the following items:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("team-118group-agent.php" instead of "wp-tga-filter.php")

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 plugin8,846 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
CSS2378,196
PHP620928538
JavaScript2484112

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity8.00
▷ Minimum class complexity2.00
▷ Maximum class complexity14.00
Average method complexity3.80
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods5
▷ Static methods00.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions17
▷ Named functions1482.35%
▷ Anonymous functions317.65%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
5 PNG files occupy 0.07MB with 0.04MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
modules/images/icon_20x20.png15.82KB1.39KB▼ 91.22%
modules/images/icon_16x16.png15.43KB0.99KB▼ 93.57%
modules/inc/assets/css/glyphicons-halflings.png12.50KB10.35KB▼ 17.19%
modules/inc/assets/css/glyphicons-halflings-white.png8.57KB9.20KB0.00%
modules/images/icon_25x25.png16.36KB1.61KB▼ 90.13%