79% pricena

Code Review | Pricena

WordPress plugin Pricena scored 79% from 54 tests.

About plugin

  • Plugin page: pricena
  • Plugin version: 1.0.1
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-5.8
  • WordPress version: 6.3.1
  • First release: Jul 13, 2021
  • Latest release: Jul 29, 2021
  • Number of updates: 5
  • Update frequency: every 4.6 days
  • Top authors: pricenadevteam (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 298 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.08MB] [CPU: ▼6.85ms] Passed 4 tests

Analyzing server-side resources used by Pricena
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0838.95 ▼3.94
Dashboard /wp-admin3.38 ▲0.0751.78 ▼4.18
Posts /wp-admin/edit.php3.50 ▲0.1473.01 ▲21.78
Add New Post /wp-admin/post-new.php5.98 ▲0.0996.13 ▼12.91
Media Library /wp-admin/upload.php3.31 ▲0.0738.18 ▼6.37
Pricena /wp-admin/options-general.php?page=pna-settings3.2837.06

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 29 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by Pricena
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,904 ▲11513.75 ▲0.066.03 ▲4.2543.02 ▼1.24
Dashboard /wp-admin2,224 ▲185.94 ▲1.08101.02 ▼9.3741.39 ▼2.10
Posts /wp-admin/edit.php2,112 ▲202.34 ▲0.2440.12 ▼0.5234.86 ▼1.38
Add New Post /wp-admin/post-new.php1,534 ▲117.82 ▼5.35708.80 ▲82.8753.68 ▼0.98
Media Library /wp-admin/upload.php1,409 ▲274.37 ▲0.1799.46 ▼6.3342.33 ▼1.94
Pricena /wp-admin/options-general.php?page=pna-settings7841.8128.1038.05

Uninstaller [IO: ✅] [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
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/pricena/public/partials/pricena-public-display.php
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/pricena/admin/partials/pricena-admin-storesetup-done.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/pricena/admin/partials/pricena-admin-display.php:19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_terms() in wp-content/plugins/pricena/admin/partials/pricena-admin-storesetup-form.php:21

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 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
8 plugin tags: saudy arabia, store comparison, egypt, price comparison, pricena...

pricena/pricena.php Passed 13 tests

The principal PHP file in "Pricena" v. 1.0.1 is loaded by WordPress automatically on each request
41 characters long description:
List your WooCommerce products on Pricena

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
No dangerous file extensions were detected520 lines of code in 20 files:
LanguageFilesBlank linesComment linesLines of code
PHP14171589505
CSS31148
JavaScript34607

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity4.14
▷ Minimum class complexity1.00
▷ Maximum class complexity19.00
Average method complexity1.73
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods30
▷ Static methods26.67%
▷ Public methods2376.67%
▷ Protected methods00.00%
▷ Private methods723.33%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants150.00%
▷ Class constants150.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
3 PNG files occupy 0.22MB with 0.13MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-1.png103.44KB33.26KB▼ 67.84%
assets/icon-128x128.png5.13KB2.09KB▼ 59.30%
assets/banner-772x250.png116.99KB65.41KB▼ 44.09%