84% nuu-contact

Code Review | NUU Contact

WordPress plugin NUU Contact scored84%from 54 tests.

About plugin

  • Plugin page: nuu-contact
  • Plugin version: 1.0
  • PHP compatiblity: 3.5+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-5.7.2
  • WordPress version: 6.3.1
  • First release: May 16, 2021
  • Latest release: May 16, 2021
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: nguyendanghung192 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /256 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.02MB] [CPU: ▼5.08ms] Passed 4 tests

Analyzing server-side resources used by NUU Contact
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0136.16 ▼8.46
Dashboard /wp-admin3.32 ▲0.0244.08 ▼0.70
Posts /wp-admin/edit.php3.37 ▲0.0245.83 ▲1.61
Add New Post /wp-admin/post-new.php5.92 ▲0.0478.64 ▼12.76
Media Library /wp-admin/upload.php3.24 ▲0.0239.30 ▲7.34

Server storage [IO: ▲0.06MB] [DB: ▲0.07MB] Passed 3 tests

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 12 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
db_upgraded
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

NUU Contact: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,868 ▲13313.33 ▼1.031.48 ▼0.3741.15 ▼1.89
Dashboard /wp-admin2,240 ▲515.97 ▲0.07110.32 ▲2.2878.39 ▲41.12
Posts /wp-admin/edit.php2,128 ▲392.28 ▲0.1439.55 ▲4.9637.62 ▲2.98
Add New Post /wp-admin/post-new.php1,699 ▲16622.65 ▼0.65679.23 ▲1.3031.44 ▼20.22
Media Library /wp-admin/upload.php1,416 ▲344.35 ▲0.1798.31 ▲0.5172.49 ▲28.80

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 75% 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 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_fields() in wp-content/plugins/nuu-contact/includes/view-admin.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
3 plugin tags: nut goi dien, nut lien lac, lien lac

nuu-contact/nuu-contact.php Passed 13 tests

The principal PHP file in "NUU Contact" v. 1.0 is loaded by WordPress automatically on each request
28 characters long description:
Fixed contact on the screen.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin344 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
CSS1111175
PHP42916166
JavaScript1213

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity5.50
▷ Minimum class complexity4.00
▷ Maximum class complexity7.00
Average method complexity1.60
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods15
▷ Static methods00.00%
▷ Public methods1493.33%
▷ Protected methods00.00%
▷ Private methods16.67%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants7100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
4 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/zalo.png7.44KB1.91KB▼ 74.36%
assets/images/call.png0.93KB0.37KB▼ 59.98%
assets/images/messenger.png4.51KB1.44KB▼ 68.01%
assets/images/nuu-logo.png3.44KB0.70KB▼ 79.57%