83% hrappka-pl

Code Review | HRappka.pl

WordPress plugin HRappka.pl scored 83% from 54 tests.

About plugin

  • Plugin page: hrappka-pl
  • Plugin version: 1.1
  • PHP compatiblity: 5.6.38+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2.1-5.2.2
  • WordPress version: 6.3.1
  • First release: Aug 30, 2019
  • Latest release: Sep 2, 2019
  • Number of updates: 5
  • Update frequency: every 1.2 days
  • Top authors: hrappka (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 534 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.23MB] [CPU: ▼4.00ms] Passed 4 tests

This is a short check of server-side resources used by HRappka.pl
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.69 ▲0.2336.00 ▼9.04
Dashboard /wp-admin3.53 ▲0.2347.29 ▼0.58
Posts /wp-admin/edit.php3.64 ▲0.2945.69 ▼2.82
Add New Post /wp-admin/post-new.php6.13 ▲0.2490.89 ▼3.55
Media Library /wp-admin/upload.php3.45 ▲0.2237.94 ▲5.31

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 56 new files
Database: 2 new tables, 7 new options
New tables
wp_hrappka_widget_settings
wp_hrappka_offer_list
New WordPress options
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
widget_hrappka_offer_list
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

HRappka.pl: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,938 ▲20313.96 ▼0.428.25 ▲6.5749.85 ▼0.56
Dashboard /wp-admin2,213 ▲255.02 ▼0.87100.34 ▼10.6881.61 ▲34.41
Posts /wp-admin/edit.php2,111 ▲222.23 ▲0.2239.07 ▲1.9637.66 ▲5.37
Add New Post /wp-admin/post-new.php1,697 ▲18025.23 ▲7.66721.95 ▲59.8361.81 ▼9.45
Media Library /wp-admin/upload.php1,404 ▲134.30 ▲0.0796.44 ▼2.1677.37 ▲31.71

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
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • widget_hrappka_offer_list
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 75% 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)
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
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 get_header() in wp-content/plugins/hrappka-pl/includes/hrappka-offer-view.php:67
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/hrappka-pl/Hrappka-offer-list.php:23

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need to be fixed:
  • Screenshots: These screenshots do not have images: #1 (Settings), #2 (Job Offers list), #3 (Job page)
The official readme.txt is a good inspiration

hrappka-pl/Hrappka-offer-list.php 77% from 13 tests

This is the main PHP file of "HRappka.pl" version 1.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 211 characters long)
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("hrappka-pl.php" instead of "Hrappka-offer-list.php")
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Everything looks great! No dangerous files found in this plugin17,071 lines of code in 29 files:
LanguageFilesBlank linesComment linesLines of code
CSS9604210,040
SVG1002,671
JavaScript46682491,900
PHP10368761,536
PO File5368160924

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity17.43
▷ Minimum class complexity2.00
▷ Maximum class complexity35.00
Average method complexity3.45
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods48
▷ Static methods1327.08%
▷ Public methods4797.92%
▷ Protected methods00.00%
▷ Private methods12.08%
Functions3
▷ Named functions00.00%
▷ Anonymous functions3100.00%
Constants36
▷ Global constants00.00%
▷ Class constants36100.00%
▷ Public constants36100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
8 PNG files occupy 0.02MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
public/flags/ru.png3.02KB0.28KB▼ 90.58%
admin/icons/logo-hrappka.png0.65KB0.50KB▼ 23.09%
public/flags/fr.png3.07KB0.46KB▼ 85.19%
public/flags/uk.png3.04KB0.40KB▼ 86.99%
public/flags/de.png3.03KB0.33KB▼ 88.95%