80% wp-profitshare

Code Review | WP Profitshare

WordPress plugin WP Profitshare scored80%from 54 tests.

About plugin

  • Plugin page: wp-profitshare
  • Plugin version: 1.4.9
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.1
  • WordPress version: 6.3.1
  • First release: Jun 25, 2014
  • Latest release: Dec 12, 2022
  • Number of updates: 150
  • Update frequency: every 20.6 days
  • Top authors: Profitshare (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

400+ active /13,474 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.45MB] [CPU: ▲1.67ms] Passed 4 tests

A check of server-side resources used by WP Profitshare
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.90 ▲0.4450.28 ▲1.67
Dashboard /wp-admin3.81 ▲0.5160.64 ▲5.38
Posts /wp-admin/edit.php3.87 ▲0.5155.71 ▲2.59
Add New Post /wp-admin/post-new.php6.31 ▲0.4390.64 ▼2.89
Media Library /wp-admin/upload.php3.66 ▲0.4345.35 ▲5.31

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 38 new files
Database: 7 new tables, 8 new options
New tables
wp_ps_convert_old_links
wp_ps_shorted_links
wp_ps_keywords
wp_ps_advertisers
wp_ps_campaigns
wp_ps_conversions
wp_ps_tag_images
New WordPress options
ps_installed_version
widget_theysaidso_widget
can_compress_scripts
db_upgraded
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
ps_adv_db_version

Browser metrics Passed 4 tests

A check of browser resources used by WP Profitshare
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,048 ▲28714.85 ▲0.487.09 ▲5.0242.60 ▼0.77
Dashboard /wp-admin2,343 ▲1636.09 ▲0.43105.91 ▲13.2143.60 ▲3.50
Posts /wp-admin/edit.php2,274 ▲1743.44 ▲1.4246.16 ▲6.0931.83 ▼5.38
Add New Post /wp-admin/post-new.php1,538 ▲1023.14 ▼0.03648.58 ▼34.3936.19 ▼17.16
Media Library /wp-admin/upload.php1,417 ▲174.13 ▲0.0182.49 ▼28.0247.98 ▼0.84

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • Zombie tables detected upon uninstall: 5 tables
    • wp_ps_convert_old_links
    • wp_ps_keywords
    • wp_ps_campaigns
    • wp_ps_tag_images
    • wp_ps_shorted_links
  • The uninstall procedure has failed, leaving 8 options in the database
    • widget_recent-posts
    • ps_adv_db_version
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • ps_installed_version
    • db_upgraded

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

SRP Passed 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
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

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

Optimizations

Plugin configuration Passed 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: afiliati, affiliates, marketing afiliat, conversion, conversie...

wp-profitshare/wp-profitshare.php Passed 13 tests

The main file in "WP Profitshare" v. 1.4.9 serves as a complement to information provided in readme.txt and as the entry point to the plugin
109 characters long description:
Converts all your direct links into affiliate links in order for you to earn commissions through Profitshare.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Good job! No executable or dangerous file extensions detected3,841 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
PHP73753362,756
CSS510611609
JavaScript611464463
SVG10013

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity17.60
▷ Minimum class complexity7.00
▷ Maximum class complexity38.00
Average method complexity2.70
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods49
▷ Static methods00.00%
▷ Public methods49100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions45
▷ Named functions45100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
12 PNG files occupy 1.04MB with 0.50MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png45.50KB23.10KB▼ 49.22%
screenshot-6.png77.90KB28.14KB▼ 63.88%
screenshot-2.png83.49KB41.37KB▼ 50.44%
images/button.png0.48KB0.45KB▼ 5.11%
screenshot-7.png571.04KB155.13KB▼ 72.83%