10% bip-pages

Code Review | BIP Pages

WordPress plugin BIP Pages scored10%from 54 tests.

About plugin

  • Plugin page: bip-pages
  • Plugin version: 1.2.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.6
  • WordPress version: 6.3.1
  • First release: Dec 18, 2020
  • Latest release: Dec 30, 2020
  • Number of updates: 13
  • Update frequency: every 0.9 days
  • Top authors: lgarczewski (100%)

Code review

54 tests

User reviews

1 review

Install metrics

300+ active /1,903 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
It is recommended to fix the following installer errors
  • Install procedure had errors
    • > User deprecated in wp-includes/functions.php+5453
    Function get_page_by_title is deprecated since version 6.2.0! Use WP_Query instead.

Server metrics [RAM: ▲0.01MB] [CPU: ▼14.12ms] Passed 4 tests

Analyzing server-side resources used by BIP Pages
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.74 ▲0.2844.73 ▲1.01
Dashboard /wp-admin3.57 ▲0.2255.00 ▼10.98
Posts /wp-admin/edit.php3.69 ▲0.3354.61 ▲2.55
Add New Post /wp-admin/post-new.php5.19 ▼0.7158.14 ▼49.06
Media Library /wp-admin/upload.php3.50 ▲0.2646.70 ▲8.52
BIP Pages Settings /wp-admin/edit.php?post_type=bip&page=bip-pages-admin3.4843.64
BIP Help & Checklist /wp-admin/edit.php?post_type=bip&page=bip-pages-checklist3.4728.95
All BIP pages /wp-admin/edit.php?post_type=bip3.6545.99
Add New /wp-admin/post-new.php?post_type=bip5.1752.32

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 82 new files
Database: no new tables, 13 new options
New WordPress options
bip-pages-delete-access-role
bip-pages-publish-access-role
bip_pages_main_page_id
can_compress_scripts
db_upgraded
widget_recent-posts
bip_pages_instruction_id
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
...

Browser metrics Passed 4 tests

BIP Pages: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,874 ▲8814.71 ▲0.361.73 ▼0.1748.35 ▲6.05
Dashboard /wp-admin2,232 ▲555.55 ▼0.1198.00 ▲3.9981.33 ▲37.75
Posts /wp-admin/edit.php2,155 ▲552.01 ▲0.0235.60 ▼6.7237.74 ▼3.63
Add New Post /wp-admin/post-new.php1,707 ▲18123.74 ▲0.63633.25 ▼63.4639.43 ▼23.89
Media Library /wp-admin/upload.php1,449 ▲494.22 ▲0.03116.39 ▲10.9180.69 ▲39.13
BIP Pages Settings /wp-admin/edit.php?post_type=bip&page=bip-pages-admin9632.0726.0236.34
BIP Help & Checklist /wp-admin/edit.php?post_type=bip&page=bip-pages-checklist1,1022.1727.3733.26
All BIP pages /wp-admin/edit.php?post_type=bip1,8212.1436.1733.14
Add New /wp-admin/post-new.php?post_type=bip6,24119.54909.4434.37

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 12 options
    • bip-pages-publish-access-role
    • bip_pages_main_page_id
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • bip-pages-edit-access-role
    • bip_pages_instruction_id
    • db_upgraded
    • bip-pages-delete-access-role
    • can_compress_scripts
    • ...

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Please fix the following server-side errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=bip
    • > User deprecated in wp-includes/functions.php+5828
    Hook block_categories is deprecated since version 5.8.0! Use block_categories_all instead.

SRP 50% 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
  • 20× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function BipPages\\add_action() in wp-content/plugins/bip-pages/bip-pages-meta-boxes.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/bip-pages/templates/bip-search-form.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/bip-pages/templates/bip-page-footer-template.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function BipPages\\Settings\\add_action() in wp-content/plugins/bip-pages/bip-pages-settings.php:29
    • > PHP Fatal error
      Uncaught Error: Call to undefined function BipPages\\add_action() in wp-content/plugins/bip-pages/bip-pages-activation.php:68
    • > PHP Fatal error
      Uncaught Error: Call to undefined function BipPages\\add_action() in wp-content/plugins/bip-pages/bip-pages-deactivation.php:49
    • > PHP Fatal error
      Uncaught Error: Call to undefined function BipPages\\esc_url() in wp-content/plugins/bip-pages/templates/bip-main-template.php:2
    • > PHP Notice
      Undefined variable: prepared_by in wp-content/plugins/bip-pages/templates/bip-page-footer-template.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/bip-pages/templates/bip-page-checklist-template.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/bip-pages/templates/bip-logo-widget-template.php:1

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
3 plugin tags: ngo, poland, government

bip-pages/bip-pages.php Passed 13 tests

The primary PHP file in "BIP Pages" version 1.2.1 is used by WordPress to initiate all plugin functionality
79 characters long description:
A plugin adding BIP (Biuletyn Informacji Publicznej) functionality to WordPress

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
Success! There were no dangerous files found in this plugin1,704 lines of code in 34 files:
LanguageFilesBlank linesComment linesLines of code
PHP23289861,265
PO File184120203
JavaScript550122
CSS418397
Markdown113017

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity12.00
▷ Minimum class complexity12.00
▷ Maximum class complexity12.00
Average method complexity2.83
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods466.67%
▷ Protected methods00.00%
▷ Private methods233.33%
Functions68
▷ Named functions6798.53%
▷ Anonymous functions11.47%
Constants5
▷ Global constants00.00%
▷ Class constants5100.00%
▷ Public constants5100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
43 PNG files occupy 0.25MB with 0.08MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/bip-logos/bip-simple-color_500px.png11.94KB5.86KB▼ 50.92%
assets/bip-logos/bip-small-2-gray-en_500px.png12.44KB5.91KB▼ 52.48%
assets/bip-logos/bip-small-1-color-en_min.png1.77KB1.79KB0.00%
assets/bip-logos/bip-full-color-pl_min.png3.27KB2.44KB▼ 25.36%
assets/bip-logos/bip-full-mono-en_500px.png7.70KB5.41KB▼ 29.79%