84% nowy-widget

Code Review | Nowy Widget for WordPress

WordPress plugin Nowy Widget for WordPress scored 84% from 54 tests.

About plugin

  • Plugin page: nowy-widget
  • Plugin version: 1.0.3
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8-6.1.1
  • WordPress version: 6.3.1
  • First release: Jan 16, 2023
  • Latest release: Mar 20, 2023
  • Number of updates: 32
  • Update frequency: every 2.0 days
  • Top authors: nowyinc (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 273 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
Install script ran successfully

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

Analyzing server-side resources used by Nowy Widget for WordPress
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0148.94 ▲0.34
Dashboard /wp-admin3.31 ▲0.0156.47 ▼6.20
Posts /wp-admin/edit.php3.36 ▲0.0153.60 ▼1.41
Add New Post /wp-admin/post-new.php5.91 ▲0.03108.87 ▼1.85
Media Library /wp-admin/upload.php3.23 ▲0.0141.77 ▲1.99

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 26 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
db_upgraded
widget_recent-comments
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

Nowy Widget for WordPress: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,816 ▲1613.08 ▼0.095.24 ▲2.9043.66 ▼1.04
Dashboard /wp-admin2,225 ▲195.79 ▲0.96102.92 ▼2.1936.87 ▼3.00
Posts /wp-admin/edit.php2,105 ▲162.01 ▼0.0037.23 ▼2.8536.01 ▲3.53
Add New Post /wp-admin/post-new.php1,547 ▲1123.05 ▼0.07626.72 ▼20.6466.99 ▲17.64
Media Library /wp-admin/upload.php1,407 ▲194.20 ▼0.01102.57 ▼7.2144.12 ▲1.85

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

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
  • 3× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/nowy-widget/nowy-widget-shortcode.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_enqueue_style() in wp-content/plugins/nowy-widget/setting.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/nowy-widget/nowy-widget.php:77

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 Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
8 plugin tags: social media content, nowy widget plugin, image gallery showcase, nowy posts gallery, shortcode...

nowy-widget/nowy-widget.php Passed 13 tests

"Nowy Widget for WordPress" version 1.0.3's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
54 characters long description:
This plugin prints "Nowy Widget" inside an admin page.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin15,790 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
CSS6130119,283
JavaScript31981705,165
PHP35881943
SVG100399

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
6 PNG files occupy 0.02MB with 0.00MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/place-marker.png1.16KB1.15KB▼ 1.43%
assets/location-place-white.png0.68KB0.65KB▼ 3.75%
assets/novylogo-2-min.png7.58KB7.33KB▼ 3.30%
assets/Heart2x.png1.38KB1.32KB▼ 3.84%
assets/default-head.png8.97KB1.72KB▼ 80.78%