84% wp-asylgesetz-referendum

Code Review | WP Asylgesetz-Referendum

WordPress plugin WP Asylgesetz-Referendum scored84%from 54 tests.

About plugin

  • Plugin page: wp-asylgesetz-ref...
  • Plugin version: 0.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.4.2
  • WordPress version: 6.3.1
  • First release: Oct 12, 2012
  • Latest release: Oct 12, 2012
  • Number of updates: 8
  • Update frequency: N/A
  • Top authors: bglaettli (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /706 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼4.70ms] Passed 4 tests

Analyzing server-side resources used by WP Asylgesetz-Referendum
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0134.99 ▼7.73
Dashboard /wp-admin3.31 ▲0.0146.51 ▼4.15
Posts /wp-admin/edit.php3.36 ▲0.0046.71 ▼0.97
Add New Post /wp-admin/post-new.php5.89 ▲0.0089.19 ▼5.96
Media Library /wp-admin/upload.php3.23 ▲0.0037.24 ▲3.25

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

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

Browser metrics Passed 4 tests

WP Asylgesetz-Referendum: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,809 ▲7413.24 ▼1.441.58 ▼0.3038.20 ▼9.91
Dashboard /wp-admin2,209 ▲184.85 ▼0.09108.62 ▲0.1742.18 ▼0.31
Posts /wp-admin/edit.php2,089 ▲32.04 ▲0.0040.03 ▲4.6835.42 ▲0.42
Add New Post /wp-admin/post-new.php1,536 ▲723.45 ▲5.03664.95 ▼18.8546.53 ▼29.88
Media Library /wp-admin/upload.php1,388 ▲34.23 ▼0.04104.76 ▲4.4745.77 ▲3.06

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-asylgesetz-referendum/wp-asylgesetzreferendum.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need your attention:
  • Screenshots: Screenshot #1 (Beispiel einer Website mit dem aktivierten Plugin: Zeigt links oben einen roten Balken mit Link auf www.asyl.ch an.) image missing
Please take inspiration from this readme.txt

wp-asylgesetz-referendum/wp-asylgesetzreferendum.php 92% from 13 tests

The main PHP script in "WP Asylgesetz-Referendum" version 0.4 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("wp-asylgesetz-referendum.php" instead of "wp-asylgesetzreferendum.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected16 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP131016

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.00
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%
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

Often times overlooked, PNG files can occupy unnecessary space in your plugin
2 PNG files occupy 0.14MB with 0.05MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png136.53KB42.45KB▼ 68.91%
wp-plugin_ecke_referendum.png6.10KB5.64KB▼ 7.49%