84% lmc-xml-reader

Code Review | LMC XML Reader

WordPress plugin LMC XML Reader scored 84% from 54 tests.

About plugin

  • Plugin page: lmc-xml-reader
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 2.2-4.8.1
  • WordPress version: 5.8.1
  • First release: Apr 15, 2016
  • Latest release: Nov 6, 2017
  • Number of updates: 9
  • Update frequency: every 63.2 days
  • Top authors: JosefStepanek (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,385 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.06MB] [CPU: ▼141.93ms] Passed 4 tests

A check of server-side resources used by LMC XML Reader
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.90 ▲0.0743.52 ▲8.92
Dashboard /wp-admin3.12 ▲0.0751.10 ▲6.50
Posts /wp-admin/edit.php3.18 ▲0.0745.95 ▼4.80
Add New Post /wp-admin/post-new.php5.49 ▲0.0698.07 ▼556.54
Media Library /wp-admin/upload.php3.07 ▲0.0632.00 ▼12.88

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 4 new files
Database: no new tables, 1 new option
New WordPress options
widget_wp_widget_lmcxmlreader

Browser metrics Passed 4 tests

LMC XML Reader: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,703 ▲10715.82 ▼0.168.57 ▼1.8650.07 ▼3.25
Dashboard /wp-admin2,973 ▲365.99 ▲0.02138.32 ▼32.49118.48 ▼4.75
Posts /wp-admin/edit.php2,739 ▼02.82 ▲0.0166.94 ▼0.7691.20 ▼11.32
Add New Post /wp-admin/post-new.php1,615 ▼6821.29 ▲2.50298.85 ▼75.85110.63 ▼1.72
Media Library /wp-admin/upload.php1,807 ▼05.02 ▲0.01166.47 ▲13.89128.56 ▼3.33

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 1 option
    • widget_wp_widget_lmcxmlreader

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please 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 __() in wp-content/plugins/lmc-xml-reader/lmc-xml-reader.php:31

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that require attention:
  • Tags: Please delete some tags, you are using 13 tag instead of maximum 10
  • Screenshots: These screenshots do not have images: #1 (Admin widget configuration), #2 (Display in a page as a shortcode)
The official readme.txt is a good inspiration

lmc-xml-reader/lmc-xml-reader.php Passed 13 tests

"LMC XML Reader" version 1.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
117 characters long description:
Live parses and displays (widget/shortcode) an external XML file from given URL (LMC.cz/Jobs.cz/Prace.cz/Teamio.com).

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin342 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP18531342

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.31
Average class complexity32.00
▷ Minimum class complexity32.00
▷ Maximum class complexity32.00
Average method complexity8.75
▷ Minimum method complexity1.00
▷ Maximum method complexity24.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%
Functions5
▷ Named functions5100.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.12MB with 0.03MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png12.32KB12.64KB0.00%
screenshot-2.png105.46KB45.85KB▼ 56.53%