73% socwit

Code Review | SocWit

WordPress plugin SocWit scored73%from 54 tests.

About plugin

  • Plugin page: socwit
  • Plugin version: 0.5
  • PHP version: 7.4.16
  • WordPress compatibility: 2.0.1-3.4
  • WordPress version: 6.3.1
  • First release: Apr 23, 2014
  • Latest release: Apr 26, 2021
  • Number of updates: 13
  • Update frequency: every 197.0 days
  • Top authors: socwitadm (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /908 total downloads

Benchmarks

Plugin footprint 83% 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: ▼2.82ms] Passed 4 tests

A check of server-side resources used by SocWit
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0239.61 ▼5.05
Dashboard /wp-admin3.33 ▲0.0350.19 ▲4.55
Posts /wp-admin/edit.php3.39 ▲0.0345.11 ▼0.09
Add New Post /wp-admin/post-new.php5.92 ▲0.0381.32 ▼5.28
Media Library /wp-admin/upload.php3.26 ▲0.0235.03 ▼0.84
Socwit /wp-admin/edit-comments.php?page=socwit3.2529.80
All Comments /wp-admin/edit-comments.php3.3242.39

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
widget_recent-comments
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for SocWit
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲7913.29 ▼1.291.68 ▼0.2446.58 ▲4.10
Dashboard /wp-admin2,231 ▲464.86 ▼1.00114.00 ▲13.8743.93 ▲1.25
Posts /wp-admin/edit.php2,113 ▲271.98 ▼0.0533.95 ▼3.3835.02 ▲1.39
Add New Post /wp-admin/post-new.php1,556 ▲3723.32 ▼0.16688.17 ▼3.5051.36 ▼11.90
Media Library /wp-admin/upload.php1,404 ▲134.32 ▲0.1399.64 ▼17.5844.04 ▼0.73
Socwit /wp-admin/edit-comments.php?page=socwit9022.5133.3824.55
All Comments /wp-admin/edit-comments.php1,8142.2836.1332.61

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Please fix the following server-side errors
    • > GET request to /wp-admin/edit-comments.php?page=socwit
    • > Notice in wp-content/plugins/socwit/socwit.php+245
    Undefined index: livdis_form_counter_sub

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 fix the following
  • 5× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Warning
      Use of undefined constant LD_URL - assumed 'LD_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/socwit/manage.php on line 16
    • > PHP Warning
      Use of undefined constant LD_URL - assumed 'LD_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/socwit/manage.php on line 32
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/socwit/manage.php:32
    • > PHP Warning
      Use of undefined constant LD_URL - assumed 'LD_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/socwit/manage.php on line 12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/socwit/socwit.php:10

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Please take a look at the following user-side issues
    • > GET request to /wp-admin/edit-comments.php?page=socwit
    • > Network (severe)
    wp-admin/header_background.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/edit-comments.php?page=socwit
    • > Network (severe)
    wp-admin/logo.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/edit-comments.php?page=socwit
    • > Network (severe)
    wp-admin/logo_bottom.png - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need to be fixed:
  • Plugin Name: You should set the name of your plugin on the first line ( === socwit === )
Please take inspiration from this readme.txt

socwit/socwit.php Passed 13 tests

The main file in "SocWit" v. 0.5 serves as a complement to information provided in readme.txt and as the entry point to the plugin
13 characters long description:
Socwit plugin

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
Good job! No executable or dangerous file extensions detected327 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP23838221
JavaScript111855
CSS17051

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.29
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%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.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
3 PNG files occupy 0.04MB with 0.02MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
css/logo_bottom.png5.09KB2.65KB▼ 47.98%
css/header_background.png31.95KB16.03KB▼ 49.82%
css/logo.png5.83KB3.72KB▼ 36.19%