78% twentyfourth-wp-scraper

Code Review | TwentyFourth WP Scraper

WordPress plugin TwentyFourth WP Scraper scored 78% from 54 tests.

About plugin

  • Plugin page: twentyfourth-wp-s...
  • Plugin version: 0.6.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.6
  • WordPress version: 5.9.2
  • First release: Jul 23, 2020
  • Latest release: Feb 6, 2021
  • Number of updates: 106
  • Update frequency: every 1.9 days
  • Top authors: mbrown24 (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

70+ active / 2,883 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲4.26MB] [CPU: ▼278.55ms] Passed 4 tests

A check of server-side resources used by TwentyFourth WP Scraper
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /8.18 ▲4.6677.24 ▲24.93
Dashboard /wp-admin8.20 ▲4.7956.66 ▲19.41
Posts /wp-admin/edit.php8.20 ▲4.5559.58 ▲21.22
Add New Post /wp-admin/post-new.php10.02 ▲3.05114.91 ▼1,176.20
Media Library /wp-admin/upload.php8.20 ▲4.9045.35 ▲21.37
Freemius Debug [v.2.3.2] /wp-admin/admin.php?page=freemius8.2093.63

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 206 new files
Database: no new tables, 4 new options
New WordPress options
fs_active_plugins
fs_debug_mode
fs_gdpr
fs_accounts

Browser metrics Passed 4 tests

A check of browser resources used by TwentyFourth WP Scraper
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,955 ▲21315.96 ▼0.0510.31 ▲3.312.25 ▲0.10
Dashboard /wp-admin2,953 ▲926.07 ▼0.06117.74 ▼21.43174.05 ▲11.51
Posts /wp-admin/edit.php2,751 ▲633.26 ▲0.0264.62 ▲2.24156.59 ▲11.22
Add New Post /wp-admin/post-new.php1,776 ▲11522.14 ▲5.01468.95 ▲50.64158.45 ▲8.65
Media Library /wp-admin/upload.php1,761 ▲635.55 ▲0.06151.70 ▲11.08208.22 ▲24.22
Freemius Debug [v.2.3.2] /wp-admin/admin.php?page=freemius1,4672.5057.63118.84

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
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 4 options in the database
    • fs_accounts
    • fs_active_plugins
    • fs_debug_mode
    • fs_gdpr

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
Even though no errors were found, this is by no means an exhaustive test

SRP 0% 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
Almost there! Just fix the following items
  • 2× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/twentyfourth-wp-scraper/public/partials/twentyfourth-wp-scraper-public-display.php
    • > /wp-content/plugins/twentyfourth-wp-scraper/freemius/templates/ajax-loader.php
  • 11× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/twentyfourth-wp-scraper/admin/ajax.php:25
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/twentyfourth-wp-scraper/freemius/templates/account/partials/addon.php on line 6
    • > PHP Notice
      Undefined variable: VARS in wp-content/plugins/twentyfourth-wp-scraper/freemius/templates/account/partials/addon.php on line 8
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_slug() on null in wp-content/plugins/twentyfourth-wp-scraper/freemius/templates/account/partials/addon.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function freemius() in wp-content/plugins/twentyfourth-wp-scraper/freemius/templates/partials/network-activation.php:6
    • > PHP Notice
      Undefined variable: VARS in wp-content/plugins/twentyfourth-wp-scraper/freemius/templates/account/partials/addon.php on line 7
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/twentyfourth-wp-scraper/freemius/templates/account/partials/addon.php on line 8
    • > PHP Fatal error
      Uncaught Error: Class 'TwentyFourth_WP_Scraper' not found in wp-content/plugins/twentyfourth-wp-scraper/admin/partials/twentyfourth-wp-scraper-admin-display.php:15
    • > PHP Notice
      Undefined variable: VARS in wp-content/plugins/twentyfourth-wp-scraper/freemius/templates/account/partials/addon.php on line 6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/twentyfourth-wp-scraper/admin/class-twentyfourth-wp-scraper-admin-ajax.php:29

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
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
1 plugin tags: scraping

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

"TwentyFourth WP Scraper" version 0.6.5's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
89 characters long description:
Scrape any website, export as anything including posts, pages, categories, products, etc.

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected46,109 lines of code in 158 files:
LanguageFilesBlank linesComment linesLines of code
PHP1227,29616,52530,273
PO File126,9608,45515,240
JavaScript752114304
Markdown1610192
CSS15121673
JSON10027

PHP code 50% from 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Please fix the following
  • Class cyclomatic complexity has to be reduced to less than 1000 (currently 2,772)
Cyclomatic complexity
Average complexity per logical line of code0.62
Average class complexity74.94
▷ Minimum class complexity1.00
▷ Maximum class complexity2,772.00
Average method complexity4.47
▷ Minimum method complexity1.00
▷ Maximum method complexity86.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes53
▷ Abstract classes23.77%
▷ Concrete classes5196.23%
▷ Final classes00.00%
Methods1,160
▷ Static methods17515.09%
▷ Public methods80969.74%
▷ Protected methods151.29%
▷ Private methods33628.97%
Functions100
▷ Named functions100100.00%
▷ Anonymous functions00.00%
Constants122
▷ Global constants9779.51%
▷ Class constants2520.49%
▷ Public constants25100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
4 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
freemius/assets/img/sss-client.png3.15KB2.85KB▼ 9.48%
freemius/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%
freemius/assets/img/sss-client-test.png9.16KB5.26KB▼ 42.58%
freemius/assets/img/plugin-icon.png9.16KB5.26KB▼ 42.58%