77% deklaracja-dostepnosci-wcag

Code Review | Deklaracja dostepnosci WCAG 2.1

WordPress plugin Deklaracja dostepnosci WCAG 2.1 scored77%from 54 tests.

About plugin

  • Plugin page: deklaracja-dostep...
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-5.4
  • WordPress version: 6.3.1
  • First release: Apr 3, 2020
  • Latest release: Oct 27, 2020
  • Number of updates: 4
  • Update frequency: every 51.8 days
  • Top authors: sulielk (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

100+ active /1,843 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.08MB] [CPU: ▼4.72ms] Passed 4 tests

This is a short check of server-side resources used by Deklaracja dostepnosci WCAG 2.1
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0640.05 ▼1.69
Dashboard /wp-admin3.39 ▲0.0852.60 ▲1.20
Posts /wp-admin/edit.php3.51 ▲0.1546.50 ▼7.58
Add New Post /wp-admin/post-new.php5.97 ▲0.0895.97 ▼10.82
Media Library /wp-admin/upload.php3.31 ▲0.0838.84 ▲3.17
Deklaracja dostępności /wp-admin/options-general.php?page=deklaracjadostepnosci3.26234.62

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Deklaracja dostepnosci WCAG 2.1
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲4913.56 ▼1.091.82 ▼0.2543.59 ▼5.50
Dashboard /wp-admin2,210 ▲254.84 ▼0.05119.19 ▼18.3341.10 ▼4.35
Posts /wp-admin/edit.php2,090 ▼21.99 ▲0.0039.40 ▼3.8031.52 ▼12.83
Add New Post /wp-admin/post-new.php1,517 ▼717.83 ▼5.10632.57 ▼37.0656.77 ▼22.23
Media Library /wp-admin/upload.php1,395 ▲74.35 ▲0.11103.97 ▼16.8846.57 ▼1.18
Deklaracja dostępności /wp-admin/options-general.php?page=deklaracjadostepnosci9492.0727.3030.49

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments

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
Please fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=deklaracjadostepnosci
    • > Warning in wp-content/plugins/deklaracja-dostepnosci-wcag/deklaracjadostepnosci.php+212
    file_get_contents(): php_network_getaddresses: getaddrinfo failed: Name or service not known
    • > GET request to /wp-admin/options-general.php?page=deklaracjadostepnosci
    • > Warning in wp-content/plugins/deklaracja-dostepnosci-wcag/deklaracjadostepnosci.php+212
    file_get_contents(http://deklaracjadostepnosci.eu/check.php?url=http://wp.com): failed to open stream: php_network_getaddresses: getaddrinfo failed: Name or service not known
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=deklaracjadostepnosci
    • > POST request to /wp-cron.php?doing_wp_cron=1696658530.1360850334167480468750
    • > Notice in wp-content/plugins/pressforward/Core/Utility/Retrieval.php+204
    Undefined offset: 0
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=deklaracjadostepnosci
    • > POST request to /wp-cron.php?doing_wp_cron=1696658530.1360850334167480468750
    • > Notice in wp-content/plugins/pressforward/Core/Utility/Retrieval.php+205
    Trying to get property 'guid' of non-object
  • 8 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=deklaracjadostepnosci
    • > POST request to /wp-cron.php?doing_wp_cron=1696658530.1360850334167480468750
    • > Notice in wp-content/plugins/pressforward/Core/Utility/Retrieval.php+221
    Trying to get property 'ID' of non-object
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=deklaracjadostepnosci
    • > POST request to /wp-cron.php?doing_wp_cron=1696658530.1360850334167480468750
    • > Notice in wp-content/plugins/pressforward/Core/Utility/Retrieval.php+222
    Trying to get property 'post_title' of non-object

SRP 50% 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
Almost there! Just fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/deklaracja-dostepnosci-wcag/deklaracjadostepnosci.php:20

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 88% 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:
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === deklaracja-dostepnosci-wcag === )
  • Contributors: Contributors not specified
The official readme.txt might help

deklaracja-dostepnosci-wcag/deklaracjadostepnosci.php 77% from 13 tests

The main PHP script in "Deklaracja dostepnosci WCAG 2.1" version 1.1 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("deklaracja-dostepnosci-wcag.php" instead of "deklaracjadostepnosci.php")
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Description: Keep the plugin description shorter than 140 characters (currently 328 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Everything looks great! No dangerous files found in this plugin338 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP123245338

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity14.00
▷ Minimum class complexity14.00
▷ Maximum class complexity14.00
Average method complexity4.25
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods250.00%
▷ Public methods250.00%
▷ Protected methods00.00%
▷ Private methods250.00%
Functions27
▷ Named functions27100.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
There were not PNG files found in your plugin