10% siwecos

Code Review | SIWECOS

WordPress plugin SIWECOS scored10%from 54 tests.

About plugin

  • Plugin page: siwecos
  • Plugin version: 1.0.1
  • PHP compatiblity: 5.6.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9.0-6.0.1
  • WordPress version: 6.3.1
  • First release: Oct 15, 2018
  • Latest release: Aug 20, 2022
  • Number of updates: 9
  • Update frequency: every 156.3 days
  • Top authors: justsnipy (88.89%)nullbyte (22.22%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active /1,081 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
You still need to fix the following installer errors
  • Install procedure had errors
    • > User notice in wp-includes/functions.php+5905
    Function register_uninstall_hook was called incorrectly. Only a static class method or function can be used in an uninstall hook. Please see Debugging in WordPress for more information. (This message was added in version 3.1.0.)

Server metrics [RAM: ▼1.90MB] [CPU: ▼55.47ms] Passed 4 tests

An overview of server-side resources used by SIWECOS
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.09 ▼1.375.01 ▼39.39
Dashboard /wp-admin2.11 ▼1.196.42 ▼40.53
Posts /wp-admin/edit.php2.12 ▼1.246.48 ▼49.17
Add New Post /wp-admin/post-new.php2.11 ▼3.787.90 ▼92.78
Media Library /wp-admin/upload.php2.11 ▼1.129.10 ▼25.51
SIWECOS /wp-admin/tools.php?page=siwecos2.125.90

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 19 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
db_upgraded
siwecos_domaintoken
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by SIWECOS
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5813.27 ▼1.034.64 ▲2.8942.83 ▼1.61
Dashboard /wp-admin2,210 ▲225.86 ▲1.03105.31 ▲4.9743.87 ▲2.53
Posts /wp-admin/edit.php2,093 ▲12.00 ▼0.0239.83 ▼2.5436.03 ▼0.93
Add New Post /wp-admin/post-new.php1,540 ▲723.40 ▲0.13698.60 ▲7.0270.19 ▲16.15
Media Library /wp-admin/upload.php1,392 ▲14.30 ▲0.1093.37 ▼9.0541.53 ▼1.20
SIWECOS /wp-admin/tools.php?page=siwecos8072.0324.2625.63

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
  • Uninstall procedure validation failed for this plugin
    • > User notice in wp-includes/functions.php+5905
    Function register_uninstall_hook was called incorrectly. Only a static class method or function can be used in an uninstall hook. Please see Debugging in WordPress for more information. (This message was added in version 3.1.0.)
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • siwecos_domaintoken
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
These errors were triggered by the plugin
    • > GET request to /wp-admin/tools.php?page=siwecos
    • > User notice in wp-includes/functions.php+5905
    Function register_uninstall_hook was called incorrectly. Only a static class method or function can be used in an uninstall hook. Please see Debugging in WordPress for more information. (This message was added in version 3.1.0.)

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
Almost there! Just fix the following items
  • 3× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_die() in wp-content/plugins/siwecos/output/form.php:19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/siwecos/siwecos.php:37
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_die() in wp-content/plugins/siwecos/output/validation.php:19

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration Passed 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
1 plugin tags: security

siwecos/siwecos.php Passed 13 tests

"SIWECOS" version 1.0.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
66 characters long description:
Validate your WordPress site against the SIWECOS.de security check

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin477 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP7130116345
Sass14054
PO File172738
CSS131331
JavaScript24179

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity15.67
▷ Minimum class complexity8.00
▷ Maximum class complexity30.00
Average method complexity2.91
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes133.33%
▷ Concrete classes266.67%
▷ Final classes00.00%
Methods23
▷ Static methods14.35%
▷ Public methods939.13%
▷ Protected methods1460.87%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.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
There were not PNG files found in your plugin