68% hangouts-cosmoquest

Code Review | Hangouts ~CosmoQuest

WordPress plugin Hangouts ~CosmoQuest scored68%from 54 tests.

About plugin

  • Plugin page: hangouts-cosmoquest
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-4.1
  • WordPress version: 6.3.1
  • First release: Apr 29, 2014
  • Latest release: Jan 30, 2015
  • Number of updates: 3
  • Update frequency: every 93.7 days
  • Top authors: Ansr (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

20+ active /1,962 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

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

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

A check of server-side resources used by Hangouts ~CosmoQuest
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.1237.86 ▼0.99
Dashboard /wp-admin3.42 ▲0.0745.08 ▼13.70
Posts /wp-admin/edit.php3.47 ▲0.1146.82 ▼3.54
Add New Post /wp-admin/post-new.php6.02 ▲0.1380.74 ▼9.32
Media Library /wp-admin/upload.php3.35 ▲0.1136.27 ▲1.88
Settings /wp-admin/admin.php?page=hangout_settings3.2931.78
Hangouts /wp-admin/admin.php?page=hangouts3.2930.02
Add Edit Shows /wp-admin/admin.php?page=hangout_add_show3.3131.01

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 3 new files
Database: 3 new tables, 8 new options
New tables
wp_hangout_data
wp_hangout_shows
wp_hangouts
New WordPress options
jal_db_version
widget_theysaidso_widget
widget_recent-posts
db_upgraded
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
widget_hangout_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Hangouts ~CosmoQuest
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,256 ▲52113.94 ▼0.446.48 ▲4.6844.61 ▼5.11
Dashboard /wp-admin2,367 ▲1886.12 ▲0.24103.32 ▲0.4243.88 ▲2.67
Posts /wp-admin/edit.php2,246 ▲1572.25 ▲0.2544.18 ▲5.8839.59 ▲7.10
Add New Post /wp-admin/post-new.php1,561 ▲2818.21 ▼5.00634.56 ▼49.3649.43 ▼13.26
Media Library /wp-admin/upload.php1,545 ▲1544.58 ▲0.27107.90 ▲2.5148.53 ▲7.78
Settings /wp-admin/admin.php?page=hangout_settings9552.0328.8726.91
Hangouts /wp-admin/admin.php?page=hangouts9111.9027.3328.33
Add Edit Shows /wp-admin/admin.php?page=hangout_add_show9082.0727.8925.35

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • This plugin does not fully uninstall, leaving 3 tables in the database
    • wp_hangout_data
    • wp_hangouts
    • wp_hangout_shows
  • The uninstall procedure has failed, leaving 8 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_hangout_widget
    • jal_db_version
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These server-side errors were triggered
  • 8 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=hangouts
    • > Notice in wp-content/plugins/hangouts-cosmoquest/wp_hangouts.php+143
    Undefined offset: 0
  • 8 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=hangouts
    • > Notice in wp-content/plugins/hangouts-cosmoquest/wp_hangouts.php+143
    Trying to access array offset on value of type null
    • > GET request to /wp-admin/admin.php?page=hangouts
    • > Warning in wp-content/plugins/hangouts-cosmoquest/wp_hangouts.php+142
    Use of undefined constant results - assumed 'results' (this will throw an Error in a future version of PHP)

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 fix the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/hangouts-cosmoquest/wp_hangouts.php:63

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
5 plugin tags: ansr, hangout, hangouts, cosmoquest, live

hangouts-cosmoquest/wp_hangouts.php 92% from 13 tests

The main PHP script in "Hangouts ~CosmoQuest" version 1.0 is automatically included on every request by WordPress
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("hangouts-cosmoquest.php" instead of "wp_hangouts.php")

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
Success! There were no dangerous files found in this plugin1,607 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript12465581,082
PHP1263525

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.14
Average class complexity17.00
▷ Minimum class complexity17.00
▷ Maximum class complexity17.00
Average method complexity5.00
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG files were detected