77% lieu-city

Code Review | Lieu.city - easily include the vr experience in your website

WordPress plugin Lieu.city - easily include the vr experience in your website scored77%from 54 tests.

About plugin

  • Plugin page: lieu-city
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.1.1
  • WordPress version: 6.3.1
  • First release: Jan 19, 2023
  • Latest release: Jan 19, 2023
  • Number of updates: 2
  • Update frequency: every 7.0 days
  • Top authors: lieucity (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /111 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.05MB] [CPU: ▼3.21ms] Passed 4 tests

Server-side resources used by Lieu.city - easily include the vr experience in your website
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0441.60 ▼5.33
Dashboard /wp-admin3.35 ▲0.0549.03 ▼2.99
Posts /wp-admin/edit.php3.46 ▲0.1148.47 ▼1.89
Add New Post /wp-admin/post-new.php5.93 ▲0.0592.10 ▼2.63
Media Library /wp-admin/upload.php3.27 ▲0.0539.00 ▲1.46

Server storage [IO: ▲28.64MB] [DB: ▲0.00MB] 67% from 3 tests

A short overview of filesystem and database impact
These are issues you should consider
  • Total filesystem usage must be limited to 25MB (currently using 28.64MB)
Filesystem: 2,795 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Lieu.city - easily include the vr experience in your website
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,840 ▲9413.32 ▼1.032.21 ▲0.2640.04 ▼4.30
Dashboard /wp-admin2,224 ▲365.83 ▲0.81100.68 ▼18.4677.01 ▲31.32
Posts /wp-admin/edit.php2,110 ▲212.01 ▲0.0240.70 ▲5.7134.03 ▲0.78
Add New Post /wp-admin/post-new.php1,679 ▲15922.38 ▼0.72721.00 ▲96.7342.32 ▼9.23
Media Library /wp-admin/upload.php1,397 ▲94.16 ▼0.07100.06 ▼12.8469.50 ▲21.89

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP 0% 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
Please fix the following items
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/lieu-city/lieu-city-plugin.php
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/lieu-city/pages/login.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/lieu-city/pages/exhibition-list.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 87% 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
These attributes need your attention:
  • Tags: Please delete some tags, you are using 11 tag instead of maximum 10
  • Donate link: Please fix this invalid url: ""
Please take inspiration from this readme.txt

lieu-city/lieu-city-plugin.php 85% from 13 tests

The primary PHP file in "Lieu.city - easily include the vr experience in your website" version 1.0.0 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("lieu-city.php" instead of "lieu-city-plugin.php")
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
No dangerous file extensions were detected305,542 lines of code in 2,576 files:
LanguageFilesBlank linesComment linesLines of code
JSON130093,703
YAML60070,768
JavaScript28214,3988,81358,784
CSS418,71442951,019
Sass1111,9401,38114,349
SVG2,0220158,112
LESS18552726,903
Markdown82690671
TypeScript6669165641
PHP89727442
HTML1550150

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity6.67
▷ Minimum class complexity1.00
▷ Maximum class complexity18.00
Average method complexity1.89
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods19
▷ Static methods210.53%
▷ Public methods19100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.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
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/svg/vr_icon.png0.68KB0.50KB▼ 26.22%