84% geniewords

Code Review | GenieWords

WordPress plugin GenieWords scored84%from 54 tests.

About plugin

  • Plugin page: geniewords
  • Plugin version: 1.5.34
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-6.0
  • WordPress version: 6.3.1
  • First release: Oct 8, 2020
  • Latest release: Jun 8, 2022
  • Number of updates: 73
  • Update frequency: every 8.3 days
  • Top authors: geniewords (100%)

Code review

54 tests

User reviews

1 review

Install metrics

70+ active /5,934 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.54MB] [CPU: ▲325.73ms] 75% from 4 tests

A check of server-side resources used by GenieWords
Please fix the following
  • Extra CPU: Extra CPU usage must be kept under 200.00ms (currently 325.73ms on /wp-admin/upload.php)
PageMemory (MB)CPU Time (ms)
Home /3.98 ▲0.5246.87 ▲0.32
Dashboard /wp-admin3.85 ▲0.55491.11 ▲441.68
Posts /wp-admin/edit.php3.96 ▲0.61492.47 ▲441.02
Add New Post /wp-admin/post-new.php6.43 ▲0.54522.26 ▲419.88
Media Library /wp-admin/upload.php3.77 ▲0.55482.87 ▲447.97

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for GenieWords
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,836 ▲9013.71 ▼0.592.32 ▲0.3139.35 ▼4.27
Dashboard /wp-admin2,205 ▲145.82 ▲0.9696.91 ▼11.3067.80 ▲26.45
Posts /wp-admin/edit.php2,100 ▲111.97 ▼0.0835.98 ▼3.0534.92 ▼3.27
Add New Post /wp-admin/post-new.php1,524 ▲1023.13 ▲5.53669.66 ▼14.8852.83 ▼4.18
Media Library /wp-admin/upload.php1,393 ▲54.12 ▲0.0195.67 ▼21.2476.94 ▲27.20

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • 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 shallow check for server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 10× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_post_meta() in wp-content/plugins/geniewords/layouts/geniewords_google_shopping.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/geniewords/geniewords.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/geniewords/layouts/logoutbtn.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_post_meta() in wp-content/plugins/geniewords/layouts/geniewords_facebook.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_post_meta() in wp-content/plugins/geniewords/layouts/geniewords_home_page.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_post_meta() in wp-content/plugins/geniewords/layouts/geniewords_facebook_pixel.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_post_meta() in wp-content/plugins/geniewords/layouts/geniewords_conversions.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_post_meta() in wp-content/plugins/geniewords/layouts/update-plugin.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_post_meta() in wp-content/plugins/geniewords/layouts/geniewords_google_analytics.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_post_meta() in wp-content/plugins/geniewords/geniewords_plugin_layout.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
4 plugin tags: geniewords, marketing, google ads, facebook ads

geniewords/geniewords.php Passed 13 tests

This is the main PHP file of "GenieWords" version 1.5.34, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
74 characters long description:
The plugin which is going to make sure your Geniewords account is in sync.

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Good job! No executable or dangerous file extensions detected3,744 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP105971463,322
PO File196135255
CSS1330167

PHP code 50% from 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
The following items need your attention
  • Method cyclomatic complexity has to be reduced to less than 100 (currently 101)
Cyclomatic complexity
Average complexity per logical line of code0.48
Average class complexity479.00
▷ Minimum class complexity479.00
▷ Maximum class complexity479.00
Average method complexity7.83
▷ Minimum method complexity1.00
▷ Maximum method complexity101.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods71
▷ Static methods11.41%
▷ Public methods6591.55%
▷ Protected methods68.45%
▷ Private methods00.00%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.00%
Constants5
▷ Global constants5100.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
8 compressed PNG files occupy 0.07MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assest/images/user.png1.33KB1.64KB0.00%
assest/images/google-shopping.png12.18KB7.58KB▼ 37.81%
assest/images/logo.png6.41KB6.26KB▼ 2.36%
assest/images/facebook.png4.01KB4.25KB0.00%
assest/images/facebook-pixel.png10.91KB10.94KB0.00%