74% tweaker-for-nf-emails

Code Review | Tweaker for Ninja Foms emails

WordPress plugin Tweaker for Ninja Foms emails scored74%from 54 tests.

About plugin

  • Plugin page: tweaker-for-nf-em...
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 6.0-6.1.1
  • WordPress version: 6.3.1
  • First release: Dec 16, 2022
  • Latest release: Dec 18, 2022
  • Number of updates: 3
  • Update frequency: every 0.7 days
  • Top authors: AdiCumpanasu (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /144 total downloads

Benchmarks

Plugin footprint 65% 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.54MB] [CPU: ▼3.36ms] Passed 4 tests

A check of server-side resources used by Tweaker for Ninja Foms emails
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /4.05 ▲0.5934.97 ▼5.73
Dashboard /wp-admin3.89 ▲0.5948.87 ▼2.43
Posts /wp-admin/edit.php3.94 ▲0.5950.59 ▲4.77
Add New Post /wp-admin/post-new.php6.43 ▲0.5588.27 ▼10.03
Media Library /wp-admin/upload.php3.66 ▲0.4338.39 ▲5.91
Tweaker for Ninja Forms emails /wp-admin/options-general.php?page=admin-page-tweaker-for-nf-emails3.8933.29
Freemius Debug [v.2.5.3] /wp-admin/admin.php?page=freemius4.0137.45

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 186 new files
Database: no new tables, 10 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
fs_accounts
theysaidso_admin_options
db_upgraded
fs_active_plugins
fs_gdpr
fs_debug_mode

Browser metrics Passed 4 tests

An overview of browser requirements for Tweaker for Ninja Foms emails
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,826 ▲5513.57 ▼1.031.62 ▼0.4327.01 ▼18.00
Dashboard /wp-admin2,229 ▲505.83 ▼0.21112.42 ▼2.3444.36 ▼5.01
Posts /wp-admin/edit.php2,115 ▲262.00 ▼0.0440.98 ▲4.6637.91 ▲1.34
Add New Post /wp-admin/post-new.php1,526 ▼722.88 ▼0.27622.73 ▲2.9456.94 ▲10.04
Media Library /wp-admin/upload.php1,408 ▲234.22 ▲0.04100.67 ▲5.1243.59 ▲1.36
Tweaker for Ninja Forms emails /wp-admin/options-general.php?page=admin-page-tweaker-for-nf-emails9812.1928.2165.54
Freemius Debug [v.2.5.3] /wp-admin/admin.php?page=freemius1,0861.7225.0227.90

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • This plugin cannot be uninstalled
    • > Notice in wp-content/plugins/tweaker-for-nf-emails/freemius/includes/class-freemius.php+8772
    Undefined property: stdClass::$plugins
  • This plugin did not uninstall successfully, leaving 10 options in the database
    • fs_accounts
    • widget_recent-posts
    • fs_debug_mode
    • fs_active_plugins
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • fs_gdpr

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
Even though everything seems fine, this is not 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
The following issues need your attention
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/tweaker-for-nf-emails/templates/admin-page.php:12

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 an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
6 plugin tags: email enhancer, email alerts, email highlighter, emails tweaker, email layout...

tweaker-for-nf-emails/tweaker-for-nf-emails.php Passed 13 tests

This is the main PHP file of "Tweaker for Ninja Foms emails" version 1.0.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
28 characters long description:
Let's tweak those raw emails

Code Analysis 97% from 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 plugin33,684 lines of code in 137 files:
LanguageFilesBlank linesComment linesLines of code
PHP1208,04717,22933,263
Markdown1680214
JavaScript33459194
CSS130013

PHP code 50% from 2 tests

A short review of cyclomatic complexity and code structure
Please fix the following
  • Class cyclomatic complexity has to be reduced to less than 1000 (currently 3,089)
Cyclomatic complexity
Average complexity per logical line of code0.63
Average class complexity88.12
▷ Minimum class complexity1.00
▷ Maximum class complexity3,089.00
Average method complexity4.59
▷ Minimum method complexity1.00
▷ Maximum method complexity94.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes51
▷ Abstract classes23.92%
▷ Concrete classes4996.08%
▷ Final classes00.00%
Methods1,266
▷ Static methods19415.32%
▷ Public methods88469.83%
▷ Protected methods171.34%
▷ Private methods36528.83%
Functions93
▷ Named functions93100.00%
▷ Anonymous functions00.00%
Constants146
▷ Global constants9967.81%
▷ Class constants4732.19%
▷ Public constants47100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
3 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
freemius/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%
freemius/assets/img/plugin-icon.png9.16KB5.26KB▼ 42.58%
freemius/assets/img/tweaker-for-nf-emails.png9.16KB5.26KB▼ 42.58%