10% citizen-initiative-support

Code Review | Citizens' initiative support

WordPress plugin Citizens' initiative support scored10%from 54 tests.

About plugin

  • Plugin page: citizen-initiativ...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-3.5.1
  • WordPress version: 6.3.1
  • First release: Apr 17, 2013
  • Latest release: Apr 18, 2013
  • Number of updates: 7
  • Update frequency: every 0.1 days
  • Top authors: SipuliSopuli (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /876 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
It is recommended to fix the following installer errors
  • This plugin did not install gracefully
    • > Deprecated in wp-content/plugins/citizen-initiative-support/kansalaisaloite.php+25
    Methods with the same name as their class will not be constructors in a future version of PHP; kacount has a deprecated constructor

Server metrics [RAM: ▼1.89MB] [CPU: ▼54.67ms] Passed 4 tests

This is a short check of server-side resources used by Citizens' initiative support
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.10 ▼1.374.16 ▼35.02
Dashboard /wp-admin2.12 ▼1.196.35 ▼40.85
Posts /wp-admin/edit.php2.12 ▼1.245.29 ▼42.28
Add New Post /wp-admin/post-new.php2.12 ▼3.775.74 ▼100.54
Media Library /wp-admin/upload.php2.12 ▼1.126.25 ▼31.03

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 8 new files
Database: no new tables, 7 new options
New WordPress options
widget_kacount-widget
db_upgraded
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Citizens' initiative support
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.57 ▼0.851.85 ▼0.3241.28 ▲0.13
Dashboard /wp-admin2,209 ▲245.85 ▼0.0398.30 ▼9.7038.14 ▼4.00
Posts /wp-admin/edit.php2,089 ▼32.01 ▼0.0334.35 ▼5.5434.93 ▲1.55
Add New Post /wp-admin/post-new.php1,535 ▲223.34 ▲0.25662.16 ▲0.0660.75 ▲11.96
Media Library /wp-admin/upload.php1,391 ▲64.31 ▲0.1393.74 ▼5.6441.18 ▼1.35

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • This plugin cannot be uninstalled
    • > Deprecated in wp-content/plugins/citizen-initiative-support/kansalaisaloite.php+25
    Methods with the same name as their class will not be constructors in a future version of PHP; kacount has a deprecated constructor
  • Zombie WordPress options were found after uninstall: 7 options
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • widget_kacount-widget
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

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
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/citizen-initiative-support/kansalaisaloite.php:17

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)
Everything seems fine on the user side

Optimizations

Plugin configuration 90% 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
Attributes that need to be fixed:
  • Donate link: Invalid url: ""
You can take inspiration from this readme.txt

citizen-initiative-support/kansalaisaloite.php 85% from 13 tests

The main PHP file in "Citizens' initiative support" ver. 1.0 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
  • Description: Please don't use more than 140 characters for the plugin description (currently 151 characters long)
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("citizen-initiative-support.php" instead of "kansalaisaloite.php")

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
There were no executable files found in this plugin200 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP12240118
PO File2336482

PHP code Passed 2 tests

Analyzing 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.19
Average class complexity15.00
▷ Minimum class complexity15.00
▷ Maximum class complexity15.00
Average method complexity4.50
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
2 PNG files occupy 0.04MB with 0.02MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png13.64KB4.88KB▼ 64.24%
screenshot-1.png23.86KB7.92KB▼ 66.82%