74% uplatnica

Code Review | Uplatnica

WordPress plugin Uplatnica scored 74% from 54 tests.

About plugin

  • Plugin page: uplatnica
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.8
  • WordPress version: 6.3.1
  • First release: Feb 11, 2022
  • Latest release: Feb 11, 2022
  • Number of updates: 9
  • Update frequency: every 18.0 days
  • Top authors: deutrix (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 955 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼5.52ms] Passed 4 tests

A check of server-side resources used by Uplatnica
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0237.04 ▼3.18
Dashboard /wp-admin3.32 ▲0.0245.49 ▼3.76
Posts /wp-admin/edit.php3.38 ▲0.0249.14 ▼0.80
Add New Post /wp-admin/post-new.php5.93 ▲0.0492.60 ▼14.34
Media Library /wp-admin/upload.php3.25 ▲0.0234.24 ▼0.76

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 30 new files
Database: no new tables, 8 new options
New WordPress options
valuta
widget_recent-comments
theysaidso_admin_options
qr_size
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for Uplatnica
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,899 ▲16413.62 ▼0.778.59 ▲6.9538.40 ▼4.85
Dashboard /wp-admin2,222 ▲314.87 ▼0.04115.04 ▲10.6940.41 ▼1.43
Posts /wp-admin/edit.php2,108 ▲162.06 ▲0.0443.96 ▲5.1434.64 ▼1.08
Add New Post /wp-admin/post-new.php1,528 ▲1423.56 ▲5.93696.47 ▲33.4257.47 ▼0.81
Media Library /wp-admin/upload.php1,398 ▲74.18 ▼0.0196.29 ▼10.4640.43 ▼6.85

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Incomplete uninstall procedure, leaving 30 files (2.31MB) in the plugin directory
    • (new file) admin/css/uplatnica-admin.css
    • (new file) banner-772x250.png
    • (new file) admin/class-uplatnica-admin.php
    • (new file) banner-1544x500.png
    • (new file) icon-128x128.png
    • (new file) LICENSE.txt
    • (new file) admin/js/uplatnica-admin.js
    • (new file) README.txt
    • (new file) admin/partials/uplatnica-admin-display.php
    • (new file) admin/index.php
    • ...
  • Zombie WordPress options detected upon uninstall: 8 options
    • widget_recent-posts
    • valuta
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • qr_size

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

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 items
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/uplatnica/public/partials/uplatnica-public-display.php:20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/uplatnica/admin/partials/uplatnica-admin-display.php:35

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
  • Donate link: Invalid URI ("")
Please take inspiration from this readme.txt

uplatnica/uplatnica.php Passed 13 tests

The principal PHP file in "Uplatnica" v. 1.0.1 is loaded by WordPress automatically on each request
49 characters long description:
A Short Plugin description. Keep it to the point.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
There were no executable files found in this plugin1,420 lines of code in 20 files:
LanguageFilesBlank linesComment linesLines of code
PHP15207765693
CSS21015482
JavaScript23413244
SVG1001

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.60
Average class complexity8.14
▷ Minimum class complexity1.00
▷ Maximum class complexity20.00
Average method complexity2.47
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods34
▷ Static methods823.53%
▷ Public methods2367.65%
▷ Protected methods00.00%
▷ Private methods1132.35%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
4 PNG files occupy 0.67MB with 0.36MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
icon-128x128.png12.72KB7.58KB▼ 40.42%
banner-772x250.png161.74KB51.85KB▼ 67.95%
icon-256x256.png31.63KB18.21KB▼ 42.44%
banner-1544x500.png477.61KB177.06KB▼ 62.93%