78% bangnam-wp

Code Review | BANGNAM WP

WordPress plugin BANGNAM WP scored 78% from 54 tests.

About plugin

  • Plugin page: bangnam-wp
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8-5.5.4
  • WordPress version: 6.3.1
  • First release: May 27, 2020
  • Latest release: Dec 23, 2020
  • Number of updates: 27
  • Update frequency: every 7.8 days
  • Top authors: bangnam (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 485 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

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

Server-side resources used by BANGNAM WP
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0140.55 ▲1.86
Dashboard /wp-admin3.31 ▲0.0144.43 ▼7.22
Posts /wp-admin/edit.php3.36 ▲0.0154.06 ▲5.98
Add New Post /wp-admin/post-new.php5.89 ▲0.01103.23 ▲10.53
Media Library /wp-admin/upload.php3.23 ▲0.0037.05 ▲0.71

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 60 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

BANGNAM WP: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲413.57 ▼1.191.61 ▼0.6547.20 ▼3.88
Dashboard /wp-admin2,221 ▲155.77 ▲0.92101.20 ▲0.6487.48 ▲48.91
Posts /wp-admin/edit.php2,107 ▲181.99 ▼0.0138.16 ▼2.0634.35 ▼2.50
Add New Post /wp-admin/post-new.php1,527 ▼621.50 ▼1.73700.81 ▲51.3856.97 ▼10.38
Media Library /wp-admin/upload.php1,406 ▲154.05 ▼0.1799.12 ▼3.5786.32 ▲39.78

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 0% 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
The following issues need your attention
  • 6× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/bangnam-wp/vendor/shuchkin/simplexlsx/examples/02-rows_and_rowsEx.php
    • > /wp-content/plugins/bangnam-wp/bangnam-wp.php
    • > /wp-content/plugins/bangnam-wp/vendor/shuchkin/simplexlsx/examples/01-basic_usage.php
    • > /wp-content/plugins/bangnam-wp/vendor/shuchkin/simplexlsx/examples/05-rows_with_header_values_as_keys.php
    • > /wp-content/plugins/bangnam-wp/vendor/shuchkin/simplexlsx/examples/04-upload_and_convert_to_html.php
    • > /wp-content/plugins/bangnam-wp/vendor/shuchkin/simplexlsx/examples/03-sheets.php
  • 18× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Warning
      require_once(wp-content/plugins/bangnam-wp/vendor/aspera/xlsx-reader/tests/../vendor/autoload.php): failed to open stream: No such file or directory in wp-content/plugins/bangnam-wp/vendor/aspera/xlsx-reader/tests/CellContentTest.php on line 5
    • > PHP Fatal error
      require_once(): Failed opening required 'wp-content/plugins/bangnam-wp/vendor/aspera/xlsx-reader/tests/../vendor/autoload.php' (include_path='.:/usr/share/php') in wp-content/plugins/bangnam-wp/vendor/aspera/xlsx-reader/tests/TempDirTest.php on line 5
    • > PHP Warning
      require_once(wp-content/plugins/bangnam-wp/vendor/aspera/xlsx-reader/tests/../vendor/autoload.php): failed to open stream: No such file or directory in wp-content/plugins/bangnam-wp/vendor/aspera/xlsx-reader/tests/DateFormatTest.php on line 5
    • > PHP Warning
      require_once(wp-content/plugins/bangnam-wp/vendor/aspera/xlsx-reader/tests/../vendor/autoload.php): failed to open stream: No such file or directory in wp-content/plugins/bangnam-wp/vendor/aspera/xlsx-reader/tests/IteratorTest.php on line 5
    • > PHP Fatal error
      require_once(): Failed opening required 'wp-content/plugins/bangnam-wp/vendor/aspera/xlsx-reader/tests/../vendor/autoload.php' (include_path='.:/usr/share/php') in wp-content/plugins/bangnam-wp/vendor/aspera/xlsx-reader/tests/SheetTest.php on line 5
    • > PHP Warning
      require_once(wp-content/plugins/bangnam-wp/vendor/aspera/xlsx-reader/tests/../vendor/autoload.php): failed to open stream: No such file or directory in wp-content/plugins/bangnam-wp/vendor/aspera/xlsx-reader/tests/SharedStringsTest.php on line 5
    • > PHP Warning
      require_once(wp-content/plugins/bangnam-wp/vendor/aspera/xlsx-reader/tests/../vendor/autoload.php): failed to open stream: No such file or directory in wp-content/plugins/bangnam-wp/vendor/aspera/xlsx-reader/tests/TempDirTest.php on line 5
    • > PHP Fatal error
      require_once(): Failed opening required 'wp-content/plugins/bangnam-wp/vendor/aspera/xlsx-reader/tests/../vendor/autoload.php' (include_path='.:/usr/share/php') in wp-content/plugins/bangnam-wp/vendor/aspera/xlsx-reader/tests/FilepartLocationTest.php on line 5
    • > PHP Warning
      require_once(wp-content/plugins/bangnam-wp/vendor/aspera/xlsx-reader/tests/../vendor/autoload.php): failed to open stream: No such file or directory in wp-content/plugins/bangnam-wp/vendor/aspera/xlsx-reader/tests/SkipEmptyCellsTest.php on line 5
    • > PHP Fatal error
      require_once(): Failed opening required 'wp-content/plugins/bangnam-wp/vendor/aspera/xlsx-reader/tests/../vendor/autoload.php' (include_path='.:/usr/share/php') in wp-content/plugins/bangnam-wp/vendor/aspera/xlsx-reader/tests/CellContentTest.php on line 5

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Please fix the following attributes:
  • Screenshots: Screenshot #3 (Optimize Full 100 point page speed only one click) image not found
The official readme.txt is a good inspiration

bangnam-wp/bangnam-wp.php 92% from 13 tests

This is the main PHP file of "BANGNAM WP" version 1.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:
  • Text Domain: The text domain follows the same naming rules as the plugin slug: lowercase characters and dashes

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
Everything looks great! No dangerous files found in this plugin4,261 lines of code in 42 files:
LanguageFilesBlank linesComment linesLines of code
PHP327121,4913,570
Markdown5950494
JSON300168
XML10028
SVG1001

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity24.43
▷ Minimum class complexity1.00
▷ Maximum class complexity163.00
Average method complexity3.67
▷ Minimum method complexity1.00
▷ Maximum method complexity59.00
Code structure
Namespaces3
Interfaces0
Traits0
Classes21
▷ Abstract classes00.00%
▷ Concrete classes21100.00%
▷ Final classes00.00%
Methods185
▷ Static methods126.49%
▷ Public methods15081.08%
▷ Protected methods00.00%
▷ Private methods3518.92%
Functions15
▷ Named functions853.33%
▷ Anonymous functions746.67%
Constants28
▷ Global constants414.29%
▷ Class constants2485.71%
▷ Public constants24100.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.02MB with 0.00MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/bangnam-anchor-text.png0.73KB0.76KB0.00%
assets/images/alert.png15.03KB7.10KB▼ 52.76%
assets/images/checked.png6.85KB6.69KB▼ 2.24%