84% lana-sitemap

Code Review | Lana Sitemap

WordPress plugin Lana Sitemap scored84%from 54 tests.

About plugin

  • Plugin page: lana-sitemap
  • Plugin version: 1.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.8
  • WordPress version: 6.3.1
  • First release: Jan 1, 2017
  • Latest release: Sep 15, 2017
  • Number of updates: 14
  • Update frequency: every 18.3 days
  • Top authors: lanadesign (78.57%)lanacodes (28.57%)

Code review

54 tests

User reviews

2 reviews

Install metrics

90+ active /4,794 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.07MB] [CPU: ▼1.23ms] Passed 4 tests

An overview of server-side resources used by Lana Sitemap
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0537.54 ▼1.41
Dashboard /wp-admin3.38 ▲0.0853.16 ▲0.81
Posts /wp-admin/edit.php3.49 ▲0.1448.60 ▲3.48
Add New Post /wp-admin/post-new.php5.96 ▲0.0894.66 ▼7.34
Media Library /wp-admin/upload.php3.30 ▲0.0837.02 ▲3.03

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 18 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Lana Sitemap
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.19 ▼1.491.66 ▲0.0138.00 ▼6.21
Dashboard /wp-admin2,206 ▲184.83 ▼0.97112.70 ▼5.2040.70 ▼3.59
Posts /wp-admin/edit.php2,089 ▼02.03 ▲0.0039.49 ▲0.0735.29 ▲0.07
Add New Post /wp-admin/post-new.php6,234 ▲4,71518.89 ▼4.15848.06 ▲225.6055.15 ▲3.19
Media Library /wp-admin/upload.php1,385 ▲64.19 ▼0.0498.47 ▼7.9741.51 ▼5.13

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

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

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'Lana_Sitemap' not found in wp-content/plugins/lana-sitemap/includes/class-lana-sitemap-admin.php:3

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

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that need to be fixed: Please take inspiration from this readme.txt

lana-sitemap/lana-sitemap.php Passed 13 tests

Analyzing the main PHP file in "Lana Sitemap" version 1.0.3
29 characters long description:
XML and Google News Sitemaps.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin2,811 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
PHP117648922,613
XSLT300154
JavaScript161244

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity183.50
▷ Minimum class complexity148.00
▷ Maximum class complexity219.00
Average method complexity4.76
▷ Minimum method complexity1.00
▷ Maximum method complexity32.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods97
▷ Static methods00.00%
▷ Public methods8688.66%
▷ Protected methods44.12%
▷ Private methods77.22%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants7100.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
There were not PNG files found in your plugin