84% wptweetimporter

Code Review | WPTweetImporter

WordPress plugin WPTweetImporter scored 84% from 54 tests.

About plugin

  • Plugin page: wptweetimporter
  • Plugin version: 1.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3.1-4.3.1
  • WordPress version: 5.8.1
  • First release: Oct 21, 2015
  • Latest release: Nov 8, 2015
  • Number of updates: 12
  • Update frequency: every 1.5 days
  • Top authors: larjen (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 466 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼157.13ms] Passed 4 tests

This is a short check of server-side resources used by WPTweetImporter
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.1241.46 ▲19.17
Dashboard /wp-admin3.07 ▲0.0249.10 ▼1.10
Posts /wp-admin/edit.php3.12 ▲0.0248.78 ▲4.72
Add New Post /wp-admin/post-new.php5.43 ▼0.0197.22 ▼631.66
Media Library /wp-admin/upload.php3.01 ▲0.0137.28 ▼0.47
WPTweetImporter /wp-admin/tools.php?page=WPTweetImporterAdmin2.9935.30

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 11 new files
Database: no new tables, 7 new options
New WordPress options
WPTweetImporter_MESSAGES
WPTweetImporter_TWITTER_CATEGORY
WPTweetImporter_STATUS
category_children
WPTweetImporter_NUMBER_OF_TWEETS
WPTweetImporter_INFOCLASS
WPTweetImporter_CURRENT_PAGE

Browser metrics Passed 4 tests

An overview of browser requirements for WPTweetImporter
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,708 ▲12615.91 ▲0.5914.63 ▲5.4658.48 ▲2.45
Dashboard /wp-admin2,978 ▲475.95 ▼0.03145.29 ▼8.20126.67 ▼5.74
Posts /wp-admin/edit.php2,766 ▲272.72 ▲0.0175.48 ▲4.9199.36 ▼8.04
Add New Post /wp-admin/post-new.php1,686 ▲318.79 ▼0.01407.16 ▲4.98125.67 ▲13.77
Media Library /wp-admin/upload.php1,815 ▲85.03 ▲0.02158.90 ▼0.58135.23 ▲6.16
WPTweetImporter /wp-admin/tools.php?page=WPTweetImporterAdmin1,1822.0866.29110.82

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
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • WPTweetImporter_STATUS
    • WPTweetImporter_CURRENT_PAGE
    • category_children
    • WPTweetImporter_NUMBER_OF_TWEETS
    • WPTweetImporter_TWITTER_CATEGORY
    • WPTweetImporter_INFOCLASS

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% 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 fix the following items
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WPTweetImporter' not found in wp-content/plugins/wptweetimporter/includes/admin.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/wptweetimporter/includes/main.php:262
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/wptweetimporter/includes/main.php:262

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

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
1 plugin tags: twitter

wptweetimporter/WPTweetImporter.php 92% from 13 tests

Analyzing the main PHP file in "WPTweetImporter" version 1.0.3
You should first fix the following items:
  • Main file name: Name the main plugin file the same as the plugin slug ("wptweetimporter.php" instead of "WPTweetImporter.php")

Code Analysis Passed 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
Everything looks great! No dangerous files found in this plugin1,056 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP6282365958
Markdown245098

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity8.60
▷ Minimum class complexity1.00
▷ Maximum class complexity29.00
Average method complexity2.28
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes15
▷ Abstract classes213.33%
▷ Concrete classes1386.67%
▷ Final classes00.00%
Methods93
▷ Static methods2729.03%
▷ Public methods8288.17%
▷ Protected methods22.15%
▷ Private methods99.68%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
PNG images were not found in this plugin