56% goro-content

Code Review | Goro Content

WordPress plugin Goro Content scored56%from 54 tests.

About plugin

  • Plugin page: goro-content
  • Plugin version: 1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-1.3
  • WordPress version: 6.3.1
  • First release: Mar 27, 2020
  • Latest release: Jun 3, 2020
  • Number of updates: 24
  • Update frequency: every 2.9 days
  • Top authors: tuandt (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /551 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▼0.90MB] [CPU: ▼34.00ms] Passed 4 tests

An overview of server-side resources used by Goro Content
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0541.84 ▲0.81
Dashboard /wp-admin3.04 ▼0.2629.98 ▼22.27
Posts /wp-admin/edit.php3.04 ▼0.3129.85 ▼23.44
Add New Post /wp-admin/post-new.php3.04 ▼2.8426.76 ▼78.83
Media Library /wp-admin/upload.php3.04 ▼0.1926.87 ▼11.47
Settings /wp-admin/admin.php?page=goro_settings3.0425.25
Goro Content /wp-admin/admin.php?page=goro_content3.1266.64

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 41 new files
Database: 1 new table, 7 new options
New tables
wp_l_campaign
New WordPress options
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_recent-posts
my_db_version
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Goro Content
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲6414.38 ▲0.031.58 ▼0.1340.42 ▼5.37
Dashboard /wp-admin2,229 ▲495.64 ▼0.0286.90 ▼5.2843.40 ▲0.44
Posts /wp-admin/edit.php2,134 ▲372.11 ▲0.1633.48 ▼1.8037.37 ▲4.42
Add New Post /wp-admin/post-new.php1,556 ▲2823.15 ▲0.07611.70 ▼49.9856.70 ▼5.97
Media Library /wp-admin/upload.php1,437 ▲374.17 ▲0.0397.26 ▼13.3040.74 ▼5.24
Settings /wp-admin/admin.php?page=goro_settings8392.0524.0428.21
Goro Content /wp-admin/admin.php?page=goro_content1,1183.4177.0864.02

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • The plugin did not uninstall gracefully
    • > Notice in wp-content/plugins/goro-content/inc/Api/SettingsApi.php+63
    Undefined index: icon_url
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
These server-side errors were triggered
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=goro_content
    • > Notice in wp-content/plugins/goro-content/inc/Api/SettingsApi.php+63
    Undefined index: icon_url
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=goro_content
    • > Notice in wp-content/plugins/goro-content/inc/Api/SettingsApi.php+63
    Undefined index: position

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/goro-content/goro-plugin.php
  • 7× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'Goro\\Base\\BaseController' not found in wp-content/plugins/goro-content/inc/Page/Admin.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'Goro\\Base\\BaseController' not found in wp-content/plugins/goro-content/inc/Base/SettingLink.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/goro-content/templates/index2.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_errors() in wp-content/plugins/goro-content/templates/settings.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Goro\\Base\\BaseController' not found in wp-content/plugins/goro-content/inc/Api/RouteApi.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'Goro\\Base\\BaseController' not found in wp-content/plugins/goro-content/inc/Base/Enqueue.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/goro-content/templates/index.php:3

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There are user-side issues you should fix
    • > GET request to /wp-admin/admin.php?page=goro_content
    • > Network (severe)
    wp-json/lit/v1/get_campaign - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=goro_content
    • > Network (severe)
    wp-json/lit/v1/get_langs - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=goro_content
    • > Network (severe)
    wp-json/lit/v1/get_categories - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need to be fixed:
  • Screenshots: Add an image for screenshot #1 (https://goroauto.com/wp-content/uploads/2020/03/logo-2.png)
  • Donate link: Invalid URI found ("none")
You can look at the official readme.txt

goro-content/goro-plugin.php 92% from 13 tests

The main PHP script in "Goro Content" version 1.3 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("goro-content.php" instead of "goro-plugin.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous files found in this plugin10,180 lines of code in 36 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript61,7681,8137,534
PHP232822512,533
CSS5171696
JSON20017

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity9.08
▷ Minimum class complexity1.00
▷ Maximum class complexity44.00
Average method complexity2.62
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces5
Interfaces0
Traits0
Classes13
▷ Abstract classes00.00%
▷ Concrete classes13100.00%
▷ Final classes17.69%
Methods61
▷ Static methods1016.39%
▷ Public methods5590.16%
▷ Protected methods23.28%
▷ Private methods46.56%
Functions20
▷ Named functions420.00%
▷ Anonymous functions1680.00%
Constants2
▷ Global constants2100.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
No PNG images were found in this plugin