10% nepali-land-converter

Code Review | Nepali Land Converter

WordPress plugin Nepali Land Converter scored10%from 54 tests.

About plugin

  • Plugin page: nepali-land-conve...
  • Plugin version: 2.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-4.5.3
  • WordPress version: 6.3.1
  • First release: Nov 1, 2014
  • Latest release: Aug 11, 2016
  • Number of updates: 23
  • Update frequency: every 28.3 days
  • Top authors: shankhadev123 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,046 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
These installer errors require your attention
  • The plugin cannot be installed
    • > Deprecated in wp-content/plugins/nepali-land-converter/class.landconverter-widget.php+3
    Methods with the same name as their class will not be constructors in a future version of PHP; Nepali_Landconverter_Widget has a deprecated constructor

Server metrics [RAM: ▼1.91MB] [CPU: ▼52.66ms] Passed 4 tests

Analyzing server-side resources used by Nepali Land Converter
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.08 ▼1.384.32 ▼38.26
Dashboard /wp-admin2.10 ▼1.217.07 ▼45.63
Posts /wp-admin/edit.php2.10 ▼1.265.85 ▼39.54
Add New Post /wp-admin/post-new.php2.10 ▼3.796.01 ▼87.19
Media Library /wp-admin/upload.php2.10 ▼1.135.04 ▼31.25

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 5 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
widget_landconverter-widget

Browser metrics Passed 4 tests

A check of browser resources used by Nepali Land Converter
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲9014.48 ▲0.101.94 ▲0.1743.64 ▼6.40
Dashboard /wp-admin2,206 ▲184.86 ▼1.03107.30 ▼0.4240.22 ▼2.86
Posts /wp-admin/edit.php2,092 ▲62.00 ▼0.0536.43 ▲1.0533.16 ▼0.73
Add New Post /wp-admin/post-new.php1,533 ▲1123.27 ▲0.24636.38 ▼32.0450.12 ▼4.85
Media Library /wp-admin/upload.php1,391 ▼04.21 ▲0.0498.76 ▼0.8941.72 ▲0.19

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • Uninstall procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/nepali-land-converter/class.landconverter-widget.php+3
    Methods with the same name as their class will not be constructors in a future version of PHP; Nepali_Landconverter_Widget has a deprecated constructor
  • This plugin does not fully uninstall, leaving 7 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_landconverter-widget
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

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× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/nepali-land-converter/class.landconverter-widget.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/nepali-land-converter/nepali-converter.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

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:
  • Screenshots: Add images for these screenshots: #1 (Admin setting), #2 (Front Display)
The official readme.txt might help

nepali-land-converter/nepali-converter.php 92% from 13 tests

The main PHP file in "Nepali Land Converter" ver. 2.0.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: Name the main plugin file the same as the plugin slug ("nepali-land-converter.php" instead of "nepali-converter.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 detected165 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP21715165

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.09
Average class complexity3.00
▷ Minimum class complexity3.00
▷ Maximum class complexity3.00
Average method complexity1.50
▷ Minimum method complexity1.00
▷ Maximum method complexity2.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%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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
No PNG files were detected