84% adnkronos-feed-importer

Code Review | ADNKronos Importer

WordPress plugin ADNKronos Importer scored84%from 54 tests.

About plugin

  • Plugin page: adnkronos-feed-im...
  • Plugin version: 1.1.0
  • PHP compatiblity: 5.6.20+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.2
  • WordPress version: 6.3.1
  • First release: Apr 14, 2023
  • Latest release: May 18, 2023
  • Number of updates: 7
  • Update frequency: every 7.1 days
  • Top authors: adnkronos (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /226 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.23MB] [CPU: ▼4.97ms] Passed 4 tests

An overview of server-side resources used by ADNKronos Importer
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.70 ▲0.2340.97 ▲0.77
Dashboard /wp-admin3.55 ▲0.2044.70 ▼20.02
Posts /wp-admin/edit.php3.66 ▲0.3048.69 ▲3.48
Add New Post /wp-admin/post-new.php6.13 ▲0.2491.21 ▼4.09
Media Library /wp-admin/upload.php3.47 ▲0.2442.70 ▲8.76
Impostazioni Account /wp-admin/admin.php?page=adnk-plugin-account3.4332.20
AdnKronos /wp-admin/admin.php?page=adnk-plugin-settings3.46306.47

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 12 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
db_upgraded
widget_recent-comments
adn_site_active
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by ADNKronos Importer
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,845 ▲9913.75 ▼0.541.73 ▼0.2343.83 ▲0.77
Dashboard /wp-admin2,248 ▲604.84 ▼0.97108.67 ▼8.8243.62 ▼1.48
Posts /wp-admin/edit.php2,133 ▲442.01 ▼0.0140.92 ▲6.5236.88 ▼4.33
Add New Post /wp-admin/post-new.php1,553 ▲1123.32 ▲4.98635.03 ▲22.9649.55 ▼15.11
Media Library /wp-admin/upload.php1,427 ▲364.19 ▼0.0597.65 ▼4.0141.89 ▼3.27
Impostazioni Account /wp-admin/admin.php?page=adnk-plugin-account9402.1824.7649.76
AdnKronos /wp-admin/admin.php?page=adnk-plugin-settings1,6682.1625.2645.16

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 7 options
    • can_compress_scripts
    • adn_site_active
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 75% 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)
The smoke test was a success, however most plugin functionality was not tested

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
Almost there! Just fix the following items
  • 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/adnkronos-feed-importer/inc/utility.php:188

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)
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need your attention: You can take inspiration from this readme.txt

adnkronos-feed-importer/adnk-importer.php 92% from 13 tests

The main PHP file in "ADNKronos Importer" ver. 1.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:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("adnkronos-feed-importer.php" instead of "adnk-importer.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
No dangerous file extensions were detected1,244 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP32211721,176
CSS19461
JavaScript14246
SVG1001

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity29.50
▷ Minimum class complexity6.00
▷ Maximum class complexity53.00
Average method complexity5.07
▷ Minimum method complexity1.00
▷ Maximum method complexity35.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods14
▷ Static methods1285.71%
▷ Public methods14100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions16
▷ Named functions16100.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
1 PNG file occupies 0.03MB with 0.02MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
admin/img/sfera.png33.19KB11.09KB▼ 66.57%