79% makhlas

Code Review | Makhlas

WordPress plugin Makhlas scored79%from 54 tests.

About plugin

  • Plugin page: makhlas
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.4
  • WordPress version: 6.3.1
  • First release: Oct 2, 2017
  • Latest release: Oct 2, 2017
  • Number of updates: 2
  • Update frequency: every 0.5 days
  • Top authors: farmad (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,052 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.05MB] [CPU: ▼9.13ms] Passed 4 tests

A check of server-side resources used by Makhlas
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0737.23 ▼5.94
Dashboard /wp-admin3.37 ▲0.0244.24 ▼17.01
Posts /wp-admin/edit.php3.48 ▲0.1348.23 ▲6.41
Add New Post /wp-admin/post-new.php5.95 ▲0.0683.16 ▼16.76
Media Library /wp-admin/upload.php3.29 ▲0.0637.33 ▲3.21
Settings /wp-admin/admin.php?page=makhlas/admin/view.php3.27410.95
Converter /wp-admin/admin.php?page=makhlas/admin/converter.php3.2630.39

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 9 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
widget_recent-posts
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget
makhlas_default_domain

Browser metrics Passed 4 tests

A check of browser resources used by Makhlas
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,824 ▲7813.31 ▼1.291.64 ▼0.0941.10 ▼6.50
Dashboard /wp-admin2,226 ▲415.81 ▲0.02103.28 ▲0.5738.48 ▼0.88
Posts /wp-admin/edit.php2,121 ▲322.01 ▼0.0036.72 ▼4.3535.30 ▼4.39
Add New Post /wp-admin/post-new.php1,557 ▲2923.17 ▲4.86657.79 ▼9.1157.20 ▲0.53
Media Library /wp-admin/upload.php1,411 ▲204.31 ▲0.0794.51 ▼2.7340.95 ▼1.21
Settings /wp-admin/admin.php?page=makhlas/admin/view.php8422.0326.3126.58
Converter /wp-admin/admin.php?page=makhlas/admin/converter.php8022.0424.6525.39

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These server-side errors were triggered
    • > GET request to /wp-admin/admin.php?page=makhlas/admin/converter.php
    • > Notice in wp-content/plugins/makhlas/admin/converter.php+14
    Undefined variable: total

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
Please fix the following
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/makhlas/admin/converter.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'Makhlas_Plugin' not found in wp-content/plugins/makhlas/admin/view.php:10

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
8 plugin tags: link, url shortener, url shortening, short permalink, shortlink...

makhlas/makhlas.php Passed 13 tests

The main file in "Makhlas" v. 1.0.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
29 characters long description:
URL shortening for WordPress.

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
Good job! No executable or dangerous file extensions detected462 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP581154411
PO File1162351

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity40.00
▷ Minimum class complexity40.00
▷ Maximum class complexity40.00
Average method complexity2.86
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods21
▷ Static methods00.00%
▷ Public methods21100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There were not PNG files found in your plugin