78% themereps-helper

Code Review | Themereps Helper

WordPress plugin Themereps Helper scored78%from 54 tests.

About plugin

  • Plugin page: themereps-helper
  • Plugin version: 1.0.4
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.3.1
  • WordPress version: 6.3.1
  • First release: Oct 22, 2022
  • Latest release: Oct 10, 2023
  • Number of updates: 20
  • Update frequency: every 17.7 days
  • Top authors: themereps (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /666 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲4.96MB] [CPU: ▲25.16ms] Passed 4 tests

This is a short check of server-side resources used by Themereps Helper
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /8.74 ▲5.2870.86 ▲31.05
Dashboard /wp-admin8.76 ▲5.4675.25 ▲26.11
Posts /wp-admin/edit.php8.76 ▲5.4177.56 ▲20.76
Add New Post /wp-admin/post-new.php9.59 ▲3.71121.73 ▲25.99
Media Library /wp-admin/upload.php8.76 ▲5.5466.56 ▲27.79
Freemius Debug [v.2.4.5] /wp-admin/admin.php?page=freemius8.7659.92

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 206 new files
Database: no new tables, 10 new options
New WordPress options
fs_gdpr
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
db_upgraded
widget_theysaidso_widget
fs_accounts
can_compress_scripts
fs_active_plugins
fs_debug_mode

Browser metrics Passed 4 tests

A check of browser resources used by Themereps Helper
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,862 ▲11613.68 ▼0.702.10 ▲0.2733.38 ▼6.18
Dashboard /wp-admin2,241 ▲504.89 ▲0.01115.40 ▲11.0946.46 ▼3.96
Posts /wp-admin/edit.php2,127 ▲352.00 ▲0.0240.74 ▼1.3437.67 ▼2.04
Add New Post /wp-admin/post-new.php1,534 ▲1321.86 ▼1.58703.82 ▲57.7352.35 ▲0.74
Media Library /wp-admin/upload.php1,423 ▲384.27 ▲0.04104.64 ▲3.6452.87 ▲4.91
Freemius Debug [v.2.4.5] /wp-admin/admin.php?page=freemius1,0801.6924.9529.49

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • This plugin did not uninstall successfully, leaving 10 options in the database
    • fs_gdpr
    • fs_debug_mode
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • fs_accounts
    • fs_active_plugins
    • can_compress_scripts

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
Good news, no errors were detected

SRP 0% 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
Please take a closer look at the following
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/themereps-helper/inc/customizer.php
  • 14× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function th_fs() in wp-content/plugins/themereps-helper/inc/widgets/contact-info.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function th_fs() in wp-content/plugins/themereps-helper/inc/menu/themereps-megamenu.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function th_fs() in wp-content/plugins/themereps-helper/inc/functions.php:119
    • > PHP Fatal error
      Uncaught Error: Class 'Walker_Nav_Menu' not found in wp-content/plugins/themereps-helper/inc/menu/megamenu_walker.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/themereps-helper/inc/dashboard/dashboard.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function th_fs() in wp-content/plugins/themereps-helper/inc/widgets/about-info.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'Walker_Nav_Menu' not found in wp-content/plugins/themereps-helper/inc/menu/megamenu_edit_walker.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function th_fs() in wp-content/plugins/themereps-helper/inc/widgets/recent-posts.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/themereps-helper/inc/dashboard/dashboard-kunty.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function th_fs() in wp-content/plugins/themereps-helper/inc/register-posttype.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)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 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
6 plugin tags: content, themereps helper, template, demo, import...

themereps-helper/themereps-helper.php 92% from 13 tests

"Themereps Helper" version 1.0.4's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 260 characters long)

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected33,261 lines of code in 155 files:
LanguageFilesBlank linesComment linesLines of code
PHP1347,73516,71932,573
CSS1366228
Markdown1680214
JavaScript538113200
JSON10027
SVG10019

PHP code 50% from 2 tests

This is a very shot review of cyclomatic complexity and code structure
Please fix the following
  • Please reduce cyclomatic complexity of classes to less than 1000 (currently 2,911)
Cyclomatic complexity
Average complexity per logical line of code0.60
Average class complexity68.94
▷ Minimum class complexity1.00
▷ Maximum class complexity2,911.00
Average method complexity4.57
▷ Minimum method complexity1.00
▷ Maximum method complexity86.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes62
▷ Abstract classes23.23%
▷ Concrete classes6096.77%
▷ Final classes00.00%
Methods1,213
▷ Static methods17814.67%
▷ Public methods85970.82%
▷ Protected methods151.24%
▷ Private methods33927.95%
Functions119
▷ Named functions119100.00%
▷ Anonymous functions00.00%
Constants127
▷ Global constants10280.31%
▷ Class constants2519.69%
▷ Public constants25100.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
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/themereps-helper.png9.16KB5.26KB▼ 42.58%
freemius/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%
freemius/assets/img/plugin-icon.png9.16KB5.26KB▼ 42.58%