74% virtual-public-square

Code Review | Virtual Public Square

WordPress plugin Virtual Public Square scored74%from 54 tests.

About plugin

  • Plugin page: virtual-public-sq...
  • Plugin version: 0.1.8
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.4-6.0.2
  • WordPress version: 6.3.1
  • First release: Mar 30, 2022
  • Latest release: Jun 2, 2023
  • Number of updates: 25
  • Update frequency: every 18.2 days
  • Top authors: psqr (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /657 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼2.46ms] Passed 4 tests

Analyzing server-side resources used by Virtual Public Square
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0338.23 ▼8.84
Dashboard /wp-admin3.33 ▲0.0252.97 ▲3.96
Posts /wp-admin/edit.php3.44 ▲0.0851.31 ▼5.00
Add New Post /wp-admin/post-new.php5.94 ▲0.0593.55 ▲0.04
Media Library /wp-admin/upload.php3.25 ▲0.0239.26 ▲6.51

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 224 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Virtual Public Square
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,805 ▲5913.24 ▼1.341.69 ▼0.1542.56 ▲4.91
Dashboard /wp-admin2,208 ▲175.85 ▲0.75106.62 ▼7.6339.36 ▼0.94
Posts /wp-admin/edit.php2,094 ▲22.02 ▼0.0235.81 ▼6.9031.85 ▼5.89
Add New Post /wp-admin/post-new.php1,533 ▲1423.30 ▲0.15662.32 ▼36.8158.39 ▲1.92
Media Library /wp-admin/upload.php1,393 ▲54.31 ▲0.10102.27 ▼0.1844.28 ▼2.65

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

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
  • 90× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'FG\\ASN1\\ASNObject' not found in wp-content/plugins/virtual-public-square/lib/fgrosse/phpasn1/lib/ASN1/Construct.php:19
    • > PHP Fatal error
      Uncaught Error: Interface 'Jose\\Component\\Signature\\Serializer\\JWSSerializer' not found in wp-content/plugins/virtual-public-square/lib/web-token/jwt-signature/Serializer/Serializer.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'FG\\ASN1\\ASNObject' not found in wp-content/plugins/virtual-public-square/lib/fgrosse/phpasn1/lib/ASN1/ExplicitlyTaggedObject.php:32
    • > PHP Fatal error
      Uncaught Error: Interface 'Jose\\Component\\Core\\Algorithm' not found in wp-content/plugins/virtual-public-square/lib/web-token/jwt-key-mgmt/Tests/FooAlgorithm.php:22
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/virtual-public-square/lib/web-token/jwt-key-mgmt/Tests/JWKFactoryTest.php:26
    • > PHP Fatal error
      Uncaught Error: Class 'FG\\ASN1\\ASNObject' not found in wp-content/plugins/virtual-public-square/lib/fgrosse/phpasn1/lib/ASN1/AbstractString.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'FG\\ASN1\\Universal\\OctetString' not found in wp-content/plugins/virtual-public-square/lib/fgrosse/phpasn1/lib/ASN1/Universal/BitString.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'FG\\ASN1\\AbstractString' not found in wp-content/plugins/virtual-public-square/lib/fgrosse/phpasn1/lib/ASN1/Universal/GraphicString.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'Jose\\Component\\Signature\\Serializer\\Serializer' not found in wp-content/plugins/virtual-public-square/lib/web-token/jwt-signature/Serializer/JSONGeneralSerializer.php:26
    • > PHP Fatal error
      Uncaught Error: Interface 'Jose\\Component\\Checker\\TokenTypeSupport' not found in wp-content/plugins/virtual-public-square/lib/web-token/jwt-signature/JWSTokenSupport.php:20

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)
No browser errors were detected

Optimizations

Plugin configuration 93% 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
3 plugin tags: identity, didpsqr, did

virtual-public-square/psqr.php 85% from 13 tests

The main file in "Virtual Public Square" v. 0.1.8 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("virtual-public-square.php" instead of "psqr.php")
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

Code Analysis 5% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Almost there! Just fix the following issues
  • For security reasons, never distribute binary or executable files with your plugin
    • .crt - Security Certificate in Firefox, IE, Chrome, Safari
      • wp-content/plugins/virtual-public-square/lib/web-token/jwt-key-mgmt/Tests/Chain/google.crt
10,774 lines of code in 166 files:
LanguageFilesBlank linesComment linesLines of code
PHP1432,1213,4509,333
JSON710960
Markdown8880201
CSS2207110
JavaScript278343106
YAML32036
XML11028

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity7.69
▷ Minimum class complexity1.00
▷ Maximum class complexity78.00
Average method complexity2.26
▷ Minimum method complexity1.00
▷ Maximum method complexity43.00
Code structure
Namespaces21
Interfaces8
Traits0
Classes129
▷ Abstract classes86.20%
▷ Concrete classes12193.80%
▷ Final classes2520.66%
Methods763
▷ Static methods15920.84%
▷ Public methods60679.42%
▷ Protected methods719.31%
▷ Private methods8611.27%
Functions9
▷ Named functions222.22%
▷ Anonymous functions777.78%
Constants99
▷ Global constants00.00%
▷ Class constants99100.00%
▷ Public constants9292.93%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There were not PNG files found in your plugin