84% anac-xml-viewer

Code Review | ANAC XML Viewer

WordPress plugin ANAC XML Viewer scored84%from 54 tests.

About plugin

  • Plugin page: anac-xml-viewer
  • Plugin version: 1.7
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3-6.2
  • WordPress version: 6.3.1
  • First release: Nov 22, 2015
  • Latest release: Feb 17, 2023
  • Number of updates: 25
  • Update frequency: every 105.7 days
  • Top authors: Milmor (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

2,000+ active /11,649 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.07MB] [CPU: ▼2.31ms] Passed 4 tests

A check of server-side resources used by ANAC XML Viewer
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0735.96 ▲1.23
Dashboard /wp-admin3.37 ▲0.0744.60 ▼8.70
Posts /wp-admin/edit.php3.42 ▲0.0647.68 ▲0.98
Add New Post /wp-admin/post-new.php5.96 ▲0.0781.20 ▼1.58
Media Library /wp-admin/upload.php3.29 ▲0.0633.14 ▲0.08
Anac XML /wp-admin/edit.php?post_type=anac-xml-view3.3332.08
Nuovo Dataset /wp-admin/post-new.php?post_type=anac-xml-view3.3341.07

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

ANAC XML Viewer: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,819 ▲5814.31 ▼0.291.66 ▲0.0337.42 ▼4.71
Dashboard /wp-admin2,225 ▲485.60 ▲0.0283.42 ▼10.7138.18 ▼0.65
Posts /wp-admin/edit.php2,127 ▲271.95 ▼0.0239.63 ▲1.2937.07 ▲3.74
Add New Post /wp-admin/post-new.php1,549 ▲2323.03 ▼0.20634.83 ▼45.4061.38 ▲7.54
Media Library /wp-admin/upload.php1,430 ▲334.16 ▼0.0397.36 ▼9.3841.52 ▼5.52
Anac XML /wp-admin/edit.php?post_type=anac-xml-view1,1071.9230.6629.39
Nuovo Dataset /wp-admin/post-new.php?post_type=anac-xml-view1,5532.8159.1235.66

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
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/anac-xml-viewer/core.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/anac-xml-viewer/anac-xml-viewer.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% 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
These attributes need to be fixed:
  • Tags: There are too many tags (34 tag instead of maximum 10)
You can take inspiration from this readme.txt

anac-xml-viewer/anac-xml-viewer.php Passed 13 tests

Analyzing the main PHP file in "ANAC XML Viewer" version 1.7
59 characters long description:
Visualizzatore XML per file generati da applicativi esterni

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
There were no executable files found in this plugin264 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP2388263
JavaScript1001

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.18
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%
Functions16
▷ Named functions1062.50%
▷ Anonymous functions637.50%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
2 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
wpg.png21.66KB8.31KB▼ 61.63%
wpgov.png0.43KB0.25KB▼ 41.67%