62% pgreca-chat

Code Review | PGreca Chat

WordPress plugin PGreca Chat scored62%from 54 tests.

About plugin

  • Plugin page: pgreca-chat
  • Plugin version: 0.8
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-4.8
  • WordPress version: 6.3.1
  • First release: May 11, 2017
  • Latest release: Jun 13, 2017
  • Number of updates: 15
  • Update frequency: every 2.2 days
  • Top authors: pgreca (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,369 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼10.18ms] Passed 4 tests

Analyzing server-side resources used by PGreca Chat
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0340.71 ▼3.56
Dashboard /wp-admin3.33 ▼0.0150.07 ▼12.86
Posts /wp-admin/edit.php3.39 ▲0.0346.82 ▼2.71
Add New Post /wp-admin/post-new.php5.92 ▲0.0394.67 ▼19.22
Media Library /wp-admin/upload.php3.26 ▲0.0334.21 ▼5.09
PGreca Chat /wp-admin/admin.php?page=pgreca_chat3.2233.05
Messages /wp-admin/admin.php?page=pgreca_chat-messages3.2033.84
Settings /wp-admin/admin.php?page=pgreca_chat-settings3.2330.69

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 17 new files
Database: 1 new table, 7 new options
New tables
wp_pgreca_chat
New WordPress options
theysaidso_admin_options
widget_recent-comments
db_upgraded
pgreca_chat_version
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for PGreca Chat
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,029 ▲25813.97 ▼0.6913.50 ▲11.0640.02 ▲0.37
Dashboard /wp-admin2,212 ▲385.53 ▼0.0691.73 ▲3.1684.37 ▲39.65
Posts /wp-admin/edit.php2,132 ▲321.98 ▼0.0437.07 ▲2.4734.08 ▼3.81
Add New Post /wp-admin/post-new.php1,553 ▲2723.10 ▼0.42593.87 ▼20.77152.91 ▲98.45
Media Library /wp-admin/upload.php1,432 ▲354.20 ▲0.0397.71 ▼1.6371.33 ▲27.30
PGreca Chat /wp-admin/admin.php?page=pgreca_chat1,0256.92154.2029.08
Messages /wp-admin/admin.php?page=pgreca_chat-messages7521.517.1416.96
Settings /wp-admin/admin.php?page=pgreca_chat-settings9702.1924.5525.44

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
Please fix the following items
  • Zombie tables were found after uninstall: 1 table
    • wp_pgreca_chat
  • The uninstall procedure has failed, leaving 7 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • pgreca_chat_version
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These errors were triggered by the plugin
    • > GET request to /wp-admin/admin.php?page=pgreca_chat-messages
    • > User notice in wp-includes/functions.php+5905
    Function wpdb::prepare was called incorrectly. The query argument of wpdb::prepare() must have a placeholder. Please see Debugging in WordPress for more information. (This message was added in version 3.9.0.)
    • > GET request to /wp-admin/admin.php?page=pgreca_chat-messages
    • > User notice in wp-includes/functions.php+5905
    Function wpdb::prepare was called incorrectly. The query does not contain the correct number of placeholders (0) for the number of arguments passed (1). Please see Debugging in WordPress for more information. (This message was added in version 4.8.3.)

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/pgreca-chat/pgreca-chat.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/pgreca-chat/pgreca-chat_integrate.php:2

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
These are user-side errors you should fix
    • > GET request to /wp-admin/admin.php?page=pgreca_chat
    • > Network (severe)
    https://googleads.g.doubleclick.net/pagead/ads?client=ca-pub-6181929637339131&output=html&h=280&slotname=7759995137&adk=3967694109&adf=2410204174&pi=t.ma~as.7759995137&w=707&fwrn=4&fwrnh=100&lmt=1697613699&rafmt=1&format=707x280&url=http%3A%2F%2Fwp.com%2Fwp-admin%2Fadmin.php%3Fpage%3Dpgreca_chat&fwr=0&rpe=1&resp_fmts=3&wgl=1&dt=1697613699162&bpp=4&bdt=227&idt=347&shv=r20231011&mjsv=m202310110101&ptt=9&saldr=aa&abxe=1&correlator=5099362347370&frm=20&pv=2&ga_vid=1280172510.1697613700&ga_sid=1697613700&ga_hid=1823571137&ga_fc=0&u_tz=180&u_his=14&u_h=600&u_w=800&u_ah=600&u_aw=800&u_cd=24&u_sd=1&adx=58&ady=111&biw=785&bih=600&scr_x=0&scr_y=0&eid=44759927%2C44759876%2C44759837%2C44801484%2C44805113%2C44805534%2C44805681%2C44805918%2C31078301&oid=2&pvsid=4374682053514669&tmod=611241464&uas=0&nvt=1&fc=896&brdim=0%2C0%2C0%2C0%2C800%2C0%2C800%2C600%2C800%2C600&vis=1&rsz=o%7Co%7CpeE%7C&abl=NS&pfx=0&cms=2&fu=128&bc=23&ifi=1&uci=a!1&fsb=1&xpc=6bUu0uLGSw&p=http%3A//wp.com&dtd=368 - Failed to load resource: the server responded with a status of 403 ()
    • > GET request to /wp-admin/admin.php?page=pgreca_chat-settings
    • > Rendering (warning) in unknown
    /wp-admin/admin.php?page=pgreca_chat-settings 149 The specified value "" does not conform to the required format. The format is "#rrggbb" where rr, gg, bb are two-digit hexadecimal numbers.
    • > GET request to /wp-admin/admin.php?page=pgreca_chat-settings
    • > Rendering (warning) in unknown
    /wp-admin/admin.php?page=pgreca_chat-settings 153 The specified value "" does not conform to the required format. The format is "#rrggbb" where rr, gg, bb are two-digit hexadecimal numbers.
    • > GET request to /wp-admin/admin.php?page=pgreca_chat-settings
    • > Rendering (warning) in unknown
    /wp-admin/admin.php?page=pgreca_chat-settings 161 The specified value "" does not conform to the required format. The format is "#rrggbb" where rr, gg, bb are two-digit hexadecimal numbers.
    • > GET request to /wp-admin/admin.php?page=pgreca_chat-settings
    • > Rendering (warning) in unknown
    /wp-admin/admin.php?page=pgreca_chat-settings 165 The specified value "" does not conform to the required format. The format is "#rrggbb" where rr, gg, bb are two-digit hexadecimal numbers.
    • > GET request to /wp-admin/admin.php?page=pgreca_chat-settings
    • > Rendering (warning) in unknown
    /wp-admin/admin.php?page=pgreca_chat-settings 169 The specified value "" does not conform to the required format. The format is "#rrggbb" where rr, gg, bb are two-digit hexadecimal numbers.
    • > GET request to /wp-admin/admin.php?page=pgreca_chat-settings
    • > Rendering (warning) in unknown
    /wp-admin/admin.php?page=pgreca_chat-settings 173 The specified value "" does not conform to the required format. The format is "#rrggbb" where rr, gg, bb are two-digit hexadecimal numbers.
    • > GET request to /wp-admin/admin.php?page=pgreca_chat-settings
    • > Rendering (warning) in unknown
    /wp-admin/admin.php?page=pgreca_chat-settings 177 The specified value "" does not conform to the required format. The format is "#rrggbb" where rr, gg, bb are two-digit hexadecimal numbers.

Optimizations

Plugin configuration 96% 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
7 plugin tags: chat plugin, chat, private chat, buddypress, wordpress live chat...

pgreca-chat/pgreca-chat.php 92% from 13 tests

The main PHP file in "PGreca Chat" ver. 0.8 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
  • Text Domain: The text domain follows the same naming rules as the plugin slug: lowercase characters and dashes

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
Success! There were no dangerous files found in this plugin1,327 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP74516639
CSS2440271
PO File2103117250
JavaScript1140167

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions22
▷ Named functions22100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
1 PNG file occupies 0.02MB with 0.02MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/icon.png19.06KB1.34KB▼ 92.96%