83% allpacka-com-integration

Code Review | Pactic.ro integration

WordPress plugin Pactic.ro integration scored83%from 54 tests.

About plugin

  • Plugin page: allpacka-com-inte...
  • Plugin version: 2.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.0.2
  • WordPress version: 6.3.1
  • First release: Mar 26, 2018
  • Latest release: Oct 12, 2022
  • Number of updates: 25
  • Update frequency: every 66.6 days
  • Top authors: allpackacom (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /1,268 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.22MB] [CPU: ▼3.42ms] Passed 4 tests

A check of server-side resources used by Pactic.ro integration
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.68 ▲0.2236.79 ▼3.51
Dashboard /wp-admin3.51 ▲0.2147.23 ▼3.75
Posts /wp-admin/edit.php3.63 ▲0.2748.17 ▲2.95
Add New Post /wp-admin/post-new.php6.12 ▲0.2389.70 ▼6.08
Media Library /wp-admin/upload.php3.44 ▲0.2135.77 ▼0.34

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Pactic.ro integration
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,897 ▲16213.84 ▼0.755.53 ▲3.7840.18 ▼8.07
Dashboard /wp-admin2,217 ▲294.88 ▲0.02104.37 ▼8.0738.98 ▼8.51
Posts /wp-admin/edit.php2,100 ▲142.04 ▼0.0934.98 ▼3.6133.34 ▲0.49
Add New Post /wp-admin/post-new.php1,534 ▼018.19 ▼5.00636.55 ▼48.3958.40 ▲9.19
Media Library /wp-admin/upload.php1,393 ▲54.30 ▲0.11101.14 ▼8.2540.93 ▼5.91

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
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 7× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'FPDF' not found in wp-content/plugins/allpacka-com-integration/includes/FPDI/fpdi_bridge.php:23
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/allpacka-com-integration/allpacka-integration.php:23
    • > PHP Warning
      "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in wp-content/plugins/allpacka-com-integration/includes/tcpdf/tcpdf.php on line 17784
    • > PHP Fatal error
      Uncaught Error: Class 'FPDF' not found in wp-content/plugins/allpacka-com-integration/includes/FPDI/fpdi_bridge.php:23
    • > PHP Fatal error
      Uncaught Error: Class 'FPDF' not found in wp-content/plugins/allpacka-com-integration/includes/FPDI/fpdi_bridge.php:23
    • > PHP Warning
      "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in wp-content/plugins/allpacka-com-integration/includes/tcpdf/tcpdf.php on line 17784
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/allpacka-com-integration/includes/allpacka.php:3

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 90% 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 to be fixed:
  • Tags: Please reduce the number of tags, currently 21 tag instead of maximum 10
The official readme.txt is a good inspiration

allpacka-com-integration/allpacka-integration.php 85% from 13 tests

This is the main PHP file of "Pactic.ro integration" version 2.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("allpacka-com-integration.php" instead of "allpacka-integration.php")
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

Code Analysis 95% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected49,772 lines of code in 41 files:
LanguageFilesBlank linesComment linesLines of code
PHP362,49512,56948,639
CSS212120412
JavaScript235158401
PO File1167218320

PHP code 0% from 2 tests

Analyzing cyclomatic complexity and code structure
Please fix the following
  • Class cyclomatic complexity should be reduced to less than 1000 (currently 4,353)
  • Please reduce cyclomatic complexity of methods to less than 100 (currently 499)
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity272.64
▷ Minimum class complexity1.00
▷ Maximum class complexity4,353.00
Average method complexity9.76
▷ Minimum method complexity1.00
▷ Maximum method complexity499.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes25
▷ Abstract classes00.00%
▷ Concrete classes25100.00%
▷ Final classes00.00%
Methods775
▷ Static methods11014.19%
▷ Public methods47260.90%
▷ Protected methods30138.84%
▷ Private methods20.26%
Functions33
▷ Named functions33100.00%
▷ Anonymous functions00.00%
Constants122
▷ Global constants10888.52%
▷ Class constants1411.48%
▷ Public constants14100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
12 compressed PNG files occupy 0.05MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/fuvarlevel_ikon.png0.65KB0.64KB▼ 1.20%
images/markercluster3.png3.86KB3.06KB▼ 20.80%
images/megrendeles_ikon.png0.69KB0.89KB0.00%
images/markercluster1.png2.93KB2.20KB▼ 25.07%
images/markercluster5.png6.68KB5.10KB▼ 23.66%