68% civic-sip

Code Review | Civic SIP

WordPress plugin Civic SIP scored68%from 54 tests.

About plugin

  • Plugin page: civic-sip
  • Plugin version: 2.0.2
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.9.5
  • WordPress version: 6.3.1
  • First release: Oct 12, 2017
  • Latest release: Apr 27, 2018
  • Number of updates: 22
  • Update frequency: every 9.0 days
  • Top authors: blockvis (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /1,481 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.01MB] [CPU: ▼9.58ms] Passed 4 tests

A check of server-side resources used by Civic SIP
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0040.62 ▲0.03
Dashboard /wp-admin3.31 ▼0.0448.13 ▼15.12
Posts /wp-admin/edit.php3.36 ▲0.0046.09 ▼6.22
Add New Post /wp-admin/post-new.php5.89 ▲0.0080.87 ▼17.01
Media Library /wp-admin/upload.php3.23 ▲0.0038.15 ▲3.26

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 800 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
db_upgraded
widget_recent-posts
theysaidso_admin_options
civic-sip-settings

Browser metrics Passed 4 tests

This is an overview of browser requirements for Civic SIP
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.43 ▼0.161.86 ▲0.1843.03 ▼3.55
Dashboard /wp-admin2,195 ▲255.59 ▼0.0891.47 ▼13.3540.02 ▼2.60
Posts /wp-admin/edit.php2,097 ▼31.96 ▼0.0433.42 ▼4.2636.54 ▲0.16
Add New Post /wp-admin/post-new.php1,526 ▼023.53 ▲0.11649.22 ▲33.4050.29 ▲0.25
Media Library /wp-admin/upload.php1,397 ▼64.19 ▼0.0198.39 ▼6.0142.55 ▼4.62

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
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Good news, no errors were detected

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
  • 2× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/civic-sip/includes/vendor/mdanter/ecc/tests/bootstrap.php
    • > /wp-content/plugins/civic-sip/admin/partials/civic-sip-admin-display.php
  • 457× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Ramsey\\Uuid\\Uuid' not found in wp-content/plugins/civic-sip/includes/vendor/ramsey/uuid/src/DegradedUuid.php:25
    • > PHP Fatal error
      Uncaught UnexpectedValueException: creating archive "wp-content/plugins/civic-sip/includes/vendor/paragonie/random_compat/dist/random_compat.phar" disabled by the php.ini setting phar.readonly in /var/www/wordpress/wp-content/plugins/civic-sip/includes/vendor/paragonie/random_compat/other/build_phar.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'FG\\ASN1\\Universal\\Set' not found in wp-content/plugins/civic-sip/includes/vendor/fgrosse/phpasn1/lib/X509/CertificateExtensions.php:24
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/civic-sip/includes/vendor/ralouphie/getallheaders/tests/GetAllHeadersTest.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'FG\\ASN1\\AbstractString' not found in wp-content/plugins/civic-sip/includes/vendor/fgrosse/phpasn1/lib/ASN1/Universal/CharacterString.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'FG\\Test\\ASN1TestCase' not found in wp-content/plugins/civic-sip/includes/vendor/fgrosse/phpasn1/tests/X509/CSR/AttributesTest.php:22
    • > PHP Fatal error
      Uncaught Error: Interface 'Jose\\Algorithm\\ContentEncryptionAlgorithmInterface' not found in wp-content/plugins/civic-sip/includes/vendor/spomky-labs/jose/src/Algorithm/ContentEncryption/AESGCM.php:17
    • > PHP Warning
      require(wp-content/plugins/civic-sip/includes/vendor/mdanter/ecc/examples/../vendor/autoload.php): failed to open stream: No such file or directory in wp-content/plugins/civic-sip/includes/vendor/mdanter/ecc/examples/creating_signature.php on line 3
    • > PHP Fatal error
      Uncaught Error: Class 'Jose\\Algorithm\\Signature\\HMAC' not found in wp-content/plugins/civic-sip/includes/vendor/spomky-labs/jose/src/Algorithm/Signature/HS256.php:21
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\RequestInterface' not found in wp-content/plugins/civic-sip/includes/vendor/psr/http-message/src/ServerRequestInterface.php:43

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
7 plugin tags: authorization, login, blockchain, civic, log in...

civic-sip/civic-sip.php 92% from 13 tests

The main PHP file in "Civic SIP" ver. 2.0.2 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:
  • Git Repository: An alternative Git repository was detected

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
Please fix the following items
  • You should never include executable (binary) or otherwise dangerous files in your plugin
    • .crt - Security Certificate in Firefox, IE, Chrome, Safari
      • wp-content/plugins/civic-sip/includes/vendor/spomky-labs/jose/tests/Unit/Certificates/Chain/google.crt
61,262 lines of code in 710 files:
LanguageFilesBlank linesComment linesLines of code
PHP6279,75122,66444,253
YAML14931159,028
Markdown351,80305,430
JSON21101,760
CSS1540482
JavaScript110780
SVG20076
XML34063
make217048
Bourne Shell33030
Dockerfile11012

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity5.15
▷ Minimum class complexity1.00
▷ Maximum class complexity197.00
Average method complexity1.72
▷ Minimum method complexity1.00
▷ Maximum method complexity43.00
Code structure
Namespaces101
Interfaces78
Traits12
Classes496
▷ Abstract classes244.84%
▷ Concrete classes47295.16%
▷ Final classes8518.01%
Methods3,629
▷ Static methods47413.06%
▷ Public methods3,02883.44%
▷ Protected methods2456.75%
▷ Private methods3569.81%
Functions267
▷ Named functions13249.44%
▷ Anonymous functions13550.56%
Constants273
▷ Global constants134.76%
▷ Class constants26095.24%
▷ Public constants260100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
4 PNG files occupy 0.42MB with 0.21MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/vendor/guzzlehttp/guzzle/docs/_static/logo.png241.87KB69.68KB▼ 71.19%
screenshot-1.png172.60KB54.39KB▼ 68.49%
includes/vendor/guzzlehttp/guzzle/docs/_static/guzzle-icon.png0.78KB0.94KB0.00%
screenshot-2.png17.71KB7.32KB▼ 58.64%