83% productive-style

Code Review | Google Fonts, Typography and Site Content

WordPress plugin Google Fonts, Typography and Site Content scored83%from 54 tests.

About plugin

  • Plugin page: productive-style
  • Plugin version: 1.1.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.4-6.4.1
  • WordPress version: 6.3.1
  • First release: Jan 6, 2023
  • Latest release: Nov 23, 2023
  • Number of updates: 24
  • Update frequency: every 13.4 days
  • Top authors: productiveminds (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /1,803 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▲1.51MB] [CPU: ▲9.79ms] Passed 4 tests

Server-side resources used by Google Fonts, Typography and Site Content
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /4.93 ▲1.4645.94 ▲4.27
Dashboard /wp-admin4.85 ▲1.5455.55 ▲6.49
Posts /wp-admin/edit.php4.90 ▲1.5460.40 ▲11.83
Add New Post /wp-admin/post-new.php7.63 ▲1.74109.03 ▲16.57
Media Library /wp-admin/upload.php4.71 ▲1.4850.18 ▲19.26
Productive Style /wp-admin/admin.php?page=productive_style_options_submenu4.6841.41
Add New /wp-admin/post-new.php?post_type=pro_content_element5.0162.17
Content Element Types /wp-admin/edit-tags.php?taxonomy=content-element-type&post_type=pro_content_element4.7147.20
Productive... /wp-admin/admin.php?page=productive_options_overview4.6642.34
All Content Elements /wp-admin/edit.php?post_type=pro_content_element4.7544.63
Global Settings /wp-admin/admin.php?page=productive_global_options_submenu4.6841.11

Server storage [IO: ▲6.82MB] [DB: ▲0.01MB] Passed 3 tests

Filesystem and database footprint
This plugin installed successfully
Filesystem: 355 new files
Database: no new tables, 14 new options
New WordPress options
productive_global_section_sharing_options
productive_global_section_slider_options
productive_global_section_popup_options
productive_global_section_misc_options
productive_style_section_integration_options
productive_style_current_db_version
productive_global_section_grid_options
theysaidso_admin_options
faq-category_children
can_compress_scripts
...

Browser metrics Passed 4 tests

Checking browser requirements for Google Fonts, Typography and Site Content
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,903 ▲14114.76 ▲0.182.63 ▲0.9467.81 ▲25.45
Dashboard /wp-admin2,256 ▲765.61 ▲0.1096.28 ▲4.7443.94 ▲3.66
Posts /wp-admin/edit.php2,158 ▲581.95 ▼0.0139.48 ▼0.8535.90 ▼0.59
Add New Post /wp-admin/post-new.php1,574 ▲4823.42 ▲0.31675.52 ▲17.3471.49 ▲18.09
Media Library /wp-admin/upload.php1,458 ▲614.22 ▲0.0396.20 ▼6.2242.96 ▼0.21
Productive Style /wp-admin/admin.php?page=productive_style_options_submenu1,1432.0028.5844.88
Add New /wp-admin/post-new.php?post_type=pro_content_element2,5427.65180.0667.99
Content Element Types /wp-admin/edit-tags.php?taxonomy=content-element-type&post_type=pro_content_element1,3322.1229.1232.37
Productive... /wp-admin/admin.php?page=productive_options_overview1,1371.9627.4247.38
All Content Elements /wp-admin/edit.php?post_type=pro_content_element1,1541.9033.7529.46
Global Settings /wp-admin/admin.php?page=productive_global_options_submenu1,4481.9529.8934.76

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 13 options
    • productive_global_section_slider_options
    • productive_global_section_popup_options
    • db_upgraded
    • productive_global_section_sharing_options
    • productive_global_section_grid_options
    • widget_recent-comments
    • faq-category_children
    • productive_style_section_integration_options
    • theysaidso_admin_options
    • can_compress_scripts
    • ...

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The following issues need your attention
  • 9× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/productive-style/admin/common/options/global/productiveminds-icons.php:463
    • > PHP Warning
      Use of undefined constant PRODUCTIVE_STYLE_PLUGIN_PATH - assumed 'PRODUCTIVE_STYLE_PLUGIN_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/productive-style/includes/standard/functions.php on line 9
    • > PHP Warning
      require_once(PRODUCTIVE_STYLE_PLUGIN_PATHincludes/common/db/db_install.php): failed to open stream: No such file or directory in wp-content/plugins/productive-style/includes/standard/functions.php on line 9
    • > PHP Warning
      Use of undefined constant PRODUCTIVE_STYLE_PLUGIN_PATH - assumed 'PRODUCTIVE_STYLE_PLUGIN_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/productive-style/admin/standard/options/partials/section-integration.php on line 36
    • > PHP Fatal error
      require(): Failed opening required 'PRODUCTIVE_STYLE_PLUGIN_PATHadmin/common/options/partials/part-section-integration.php' (include_path='.:/usr/share/php') in wp-content/plugins/productive-style/admin/standard/options/partials/section-integration.php on line 36
    • > PHP Fatal error
      require_once(): Failed opening required 'PRODUCTIVE_STYLE_PLUGIN_PATHincludes/common/db/db_install.php' (include_path='.:/usr/share/php') in wp-content/plugins/productive-style/includes/standard/functions.php on line 9
    • > PHP Warning
      require(PRODUCTIVE_STYLE_PLUGIN_PATHadmin/common/options/partials/part-section-integration.php): failed to open stream: No such file or directory in wp-content/plugins/productive-style/admin/standard/options/partials/section-integration.php on line 36
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/productive-style/admin/common/options/global/productiveminds-social-share.php:137
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/productive-style/admin/common/options/global/global-settings-admin.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Please fix the following attributes:
  • Donate link: Please fix this invalid URI: ""
  • Tags: You are using too many tags: 13 tag instead of maximum 10
The official readme.txt is a good inspiration

productive-style/productive-style.php 92% from 13 tests

Analyzing the main PHP file in "Google Fonts, Typography and Site Content" version 1.1.1
It is important to fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 162 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin13,503 lines of code in 55 files:
LanguageFilesBlank linesComment linesLines of code
PHP461,0511,2347,832
CSS51802415,297
JavaScript34243343
XML10031

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity5.67
▷ Minimum class complexity2.00
▷ Maximum class complexity11.00
Average method complexity2.17
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods12
▷ Static methods12100.00%
▷ Public methods12100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions361
▷ Named functions361100.00%
▷ Anonymous functions00.00%
Constants130
▷ Global constants130100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
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
public/images/productivemedia/icons/check-circle.png5.45KB2.58KB▼ 52.71%
public/images/productivemedia/icons/close.png3.46KB1.76KB▼ 49.15%
public/images/productivemedia/icons/close-circle.png6.21KB2.75KB▼ 55.79%
public/images/productivemedia/icons/check-jagged.png3.41KB1.91KB▼ 43.99%
public/images/productivemedia/icons/close-jagged.png4.12KB2.46KB▼ 40.23%