72% wp-scraper

Code Review | WP Scraper

WordPress plugin WP Scraper scored72%from 54 tests.

About plugin

  • Plugin page: wp-scraper
  • Plugin version: 5.7
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Nov 12, 2015
  • Latest release: Aug 19, 2023
  • Number of updates: 75
  • Update frequency: every 37.8 days
  • Top authors: Rico Macchi (100%)

Code review

54 tests

User reviews

22 reviews

Install metrics

4,000+ active /91,375 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
Install script ran successfully

Server metrics [RAM: ▲0.31MB] [CPU: ▲1.14ms] Passed 4 tests

A check of server-side resources used by WP Scraper
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.77 ▲0.3142.08 ▲2.28
Dashboard /wp-admin3.62 ▲0.3246.08 ▼0.19
Posts /wp-admin/edit.php3.73 ▲0.3847.13 ▲0.38
Add New Post /wp-admin/post-new.php6.20 ▲0.3298.29 ▲4.23
Media Library /wp-admin/upload.php3.54 ▲0.3237.61 ▲2.08
Multiple Scrape3 /wp-admin/admin.php?page=wp-scraper-results-menu3.5034.02
Multiple Scrape /wp-admin/admin.php?page=wp-scraper-url-menu3.5132.45
Pro Versions /wp-admin/admin.php?page=wp-scraper-pro-versions3.5131.19
Multiple Scrape2 /wp-admin/admin.php?page=wp-scraper-add-menu3.5136.27
Single Scrape /wp-admin/admin.php?page=wp-scraper3.5944.99
Help /wp-admin/admin.php?page=wp-scraper-help-menu3.5136.32

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 100 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
db_upgraded
widget_recent-comments
can_compress_scripts
wpscraper_mlimit
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by WP Scraper
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,827 ▲9214.68 ▲0.301.61 ▼0.2239.60 ▼4.28
Dashboard /wp-admin2,236 ▲504.86 ▼0.05107.06 ▼12.0346.42 ▲0.98
Posts /wp-admin/edit.php2,119 ▲301.99 ▼0.0234.57 ▼0.7732.12 ▼7.12
Add New Post /wp-admin/post-new.php1,571 ▲3818.54 ▼4.85592.74 ▼94.5072.76 ▲15.24
Media Library /wp-admin/upload.php1,418 ▲304.18 ▼0.0398.72 ▼9.4043.85 ▼2.85
Multiple Scrape3 /wp-admin/admin.php?page=wp-scraper-results-menu9492.3828.3823.80
Multiple Scrape /wp-admin/admin.php?page=wp-scraper-url-menu1,0132.2325.6828.03
Pro Versions /wp-admin/admin.php?page=wp-scraper-pro-versions9292.0228.6441.81
Multiple Scrape2 /wp-admin/admin.php?page=wp-scraper-add-menu2,1037.37152.8162.64
Single Scrape /wp-admin/admin.php?page=wp-scraper2,0707.37145.6947.75
Help /wp-admin/admin.php?page=wp-scraper-help-menu1,6182.0128.3538.53

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
The following items require your attention
  • This plugin does not fully uninstall, leaving 7 options in the database
    • theysaidso_admin_options
    • wpscraper_mlimit
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Smoke test failed, please fix the following
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wp-scraper-add-menu
    • > Notice in wp-content/plugins/wp-scraper/wp-scraper.php+185
    Undefined index: url_list

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 9× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'PHPCrawl\\CookieCache\\PHPCrawlerCookieCacheBase' not found in wp-content/plugins/wp-scraper/includes/libs/CookieCache/PHPCrawlerMemoryCookieCache.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'PHPCrawl\\UrlCache\\PHPCrawlerURLCacheBase' not found in wp-content/plugins/wp-scraper/includes/libs/UrlCache/PHPCrawlerSQLiteURLCache.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'PHPCrawlerURLCacheBase' not found in wp-content/plugins/wp-scraper/includes/libs/UrlCache/PHPCrawlerMemoryURLCache.class.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'PHPCrawlerCookieCacheBase' not found in wp-content/plugins/wp-scraper/includes/libs/CookieCache/PHPCrawlerMemoryCookieCache.class.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'PHPCrawlerCookieCacheBase' not found in wp-content/plugins/wp-scraper/includes/libs/CookieCache/PHPCrawlerSQLiteCookieCache.class.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'PHPCrawl\\CookieCache\\PHPCrawlerCookieCacheBase' not found in wp-content/plugins/wp-scraper/includes/libs/CookieCache/PHPCrawlerSQLiteCookieCache.php:19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function untrailingslashit() in wp-content/plugins/wp-scraper/wp-scraper.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'PHPCrawlerURLCacheBase' not found in wp-content/plugins/wp-scraper/includes/libs/UrlCache/PHPCrawlerSQLiteURLCache.class.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'PHPCrawl\\UrlCache\\PHPCrawlerURLCacheBase' not found in wp-content/plugins/wp-scraper/includes/libs/UrlCache/PHPCrawlerMemoryURLCache.php:13

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There are user-side issues you should fix
    • > GET request to /wp-admin/admin.php?page=wp-scraper-results-menu
    • > Network (severe)
    wp-admin/admin.php?page=wp-scraper&action=add - Failed to load resource: the server responded with a status of 403 (Forbidden)

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that need to be fixed:
  • Requires at least: Invalid version format
  • Tags: Please reduce the number of tags, currently 12 tag instead of maximum 10
The official readme.txt is a good inspiration

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

The primary PHP file in "WP Scraper" version 5.7 is used by WordPress to initiate all plugin functionality
86 characters long description:
This plugin allows you to copy content from websites directly to your WordPress posts.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin12,240 lines of code in 73 files:
LanguageFilesBlank linesComment linesLines of code
PHP662,8617,40310,376
JavaScript6108621,564
CSS1576300

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity23.22
▷ Minimum class complexity1.00
▷ Maximum class complexity246.00
Average method complexity3.67
▷ Minimum method complexity1.00
▷ Maximum method complexity63.00
Code structure
Namespaces6
Interfaces0
Traits0
Classes68
▷ Abstract classes45.88%
▷ Concrete classes6494.12%
▷ Final classes00.00%
Methods574
▷ Static methods8715.16%
▷ Public methods48784.84%
▷ Protected methods8715.16%
▷ Private methods00.00%
Functions23
▷ Named functions1773.91%
▷ Anonymous functions626.09%
Constants74
▷ Global constants2331.08%
▷ Class constants5168.92%
▷ Public constants51100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
2 PNG files occupy 0.63MB with 0.22MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/New-pro-Screenshots.png492.10KB154.42KB▼ 68.62%
images/WP-Live-Scraper-1.png152.62KB151.75KB▼ 0.57%