78% puppyfw

Code Review | PuppyFW

WordPress plugin PuppyFW scored78%from 54 tests.

About plugin

  • Plugin page: puppyfw
  • Plugin version: 0.4.4
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8-4.9
  • WordPress version: 6.3.1
  • First release: Oct 23, 2017
  • Latest release: Dec 12, 2017
  • Number of updates: 9
  • Update frequency: every 5.6 days
  • Top authors: truongwp (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /768 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.38MB] [CPU: ▼12.89ms] Passed 4 tests

This is a short check of server-side resources used by PuppyFW
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.63 ▲0.1743.14 ▼3.49
Dashboard /wp-admin3.70 ▲0.3952.58 ▲1.57
Posts /wp-admin/edit.php3.75 ▲0.3953.00 ▲7.62
Add New Post /wp-admin/post-new.php3.50 ▼2.3940.66 ▼55.36
Media Library /wp-admin/upload.php3.56 ▲0.3343.99 ▲5.72
Options pages /wp-admin/edit.php?post_type=puppyfw_page3.6042.88
Add New /wp-admin/post-new.php?post_type=puppyfw_page3.6848.12

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 72 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

PuppyFW: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲5414.71 ▲0.161.73 ▼0.1244.38 ▲0.51
Dashboard /wp-admin2,224 ▲445.63 ▼0.0292.69 ▼6.6041.29 ▼2.55
Posts /wp-admin/edit.php2,129 ▲322.03 ▲0.0140.78 ▲3.8437.92 ▲2.06
Add New Post /wp-admin/post-new.php1,558 ▲3218.18 ▼5.48607.14 ▼94.8879.29 ▲9.80
Media Library /wp-admin/upload.php1,426 ▲264.17 ▼0.06105.22 ▼10.6845.32 ▼0.51
Options pages /wp-admin/edit.php?post_type=puppyfw_page1,1051.9930.6432.98
Add New /wp-admin/post-new.php?post_type=puppyfw_page1,8193.6489.6536.09

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments

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
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 23× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'PuppyFW\\Fields\\Choice' not found in wp-content/plugins/puppyfw/src/Fields/Select.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'PuppyFW\\Fields\\Choice' not found in wp-content/plugins/puppyfw/src/Fields/CheckboxList.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/puppyfw/puppyfw.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'PuppyFW\\Singleton' not found in wp-content/plugins/puppyfw/src/Framework.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'PuppyFW\\Fields\\Field' not found in wp-content/plugins/puppyfw/src/Fields/Input.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'PuppyFW\\Fields\\Field' not found in wp-content/plugins/puppyfw/src/Fields/Images.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'PuppyFW\\Fields\\Field' not found in wp-content/plugins/puppyfw/src/Fields/Tab.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'PuppyFW\\Fields\\Field' not found in wp-content/plugins/puppyfw/src/Fields/Editor.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'PuppyFW\\Fields\\Field' not found in wp-content/plugins/puppyfw/src/Fields/Html.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_template_directory() in wp-content/plugins/puppyfw/theme-loader.php:13

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
These are user-side errors you should fix
    • > GET request to /wp-admin/post-new.php?post_type=puppyfw_page
    • > Console-api (warning) in unknown
    https://maps.googleapis.com/maps/api/js?key=AIzaSyDuOALLadUZV06Yroa1SonBWh5coy-RNZc&libraries=places&ver=6.3.1 235:51 "Google Maps JavaScript API has been loaded directly without a callback. This is not supported and can lead to race conditions and suboptimal performance. For supported loading patterns please see https://goo.gle/js-api-loading"
    • > GET request to /wp-admin/post-new.php?post_type=puppyfw_page
    • > Javascript (severe) in unknown
    /wp-content/plugins/puppyfw/assets/js/builder-tools.js?ver=0.4.0 25:17 Uncaught ReferenceError: Clipboard is not defined

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need your attention:
  • Screenshots: These screenshots require images: #1 (Basic fields), #2 (WordPress fields), #3 (Advanced fields)
The official readme.txt might help

puppyfw/puppyfw.php 92% from 13 tests

Analyzing the main PHP file in "PuppyFW" version 0.4.4
The following require your attention:
  • Description: The description should be shorter than 140 characters (currently 223 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected4,646 lines of code in 62 files:
LanguageFilesBlank linesComment linesLines of code
PHP457141,2632,560
JavaScript113802131,621
CSS4668356
Markdown2310109

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity5.83
▷ Minimum class complexity1.00
▷ Maximum class complexity44.00
Average method complexity2.14
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces4
Interfaces0
Traits0
Classes36
▷ Abstract classes25.56%
▷ Concrete classes3494.44%
▷ Final classes00.00%
Methods154
▷ Static methods2818.18%
▷ Public methods12379.87%
▷ Protected methods3019.48%
▷ Private methods10.65%
Functions10
▷ Named functions990.00%
▷ Anonymous functions110.00%
Constants5
▷ Global constants480.00%
▷ Class constants120.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
6 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/lib/jquery-ui/images/ui-icons_cc0000_256x240.png4.44KB4.17KB▼ 6.02%
assets/lib/jquery-ui/images/ui-icons_444444_256x240.png6.83KB4.17KB▼ 38.86%
assets/lib/jquery-ui/images/ui-icons_ffffff_256x240.png6.15KB4.17KB▼ 32.13%
assets/lib/jquery-ui/images/ui-icons_777777_256x240.png6.83KB4.17KB▼ 38.92%
assets/lib/jquery-ui/images/ui-icons_777620_256x240.png4.44KB4.17KB▼ 6.02%