10% ns-tweet

Code Review | NS Tweet

WordPress plugin NS Tweet scored10%from 54 tests.

About plugin

  • Plugin page: ns-tweet
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.4.2
  • WordPress version: 6.3.1
  • First release: Oct 14, 2014
  • Latest release: Apr 13, 2016
  • Number of updates: 25
  • Update frequency: every 21.9 days
  • Top authors: misharnet (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /1,897 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
You still need to fix the following installer errors
  • The plugin did not install without errors
    • > Deprecated in wp-content/plugins/ns-tweet/ns-tweet.php+385
    Function create_function() is deprecated

Server metrics [RAM: ▼1.82MB] [CPU: ▼52.55ms] Passed 4 tests

A check of server-side resources used by NS Tweet
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.17 ▼1.295.93 ▼37.47
Dashboard /wp-admin2.19 ▼1.116.26 ▼46.17
Posts /wp-admin/edit.php2.19 ▼1.176.26 ▼42.83
Add New Post /wp-admin/post-new.php2.19 ▼3.706.38 ▼83.72
Media Library /wp-admin/upload.php2.19 ▼1.045.60 ▼30.47
NetScripter Tweet Settings /wp-admin/plugins.php?page=netscripter-tweet-settings2.296.51

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 12 new files
Database: no new tables, 7 new options
New WordPress options
widget_netscripter_tweet
widget_recent-posts
widget_theysaidso_widget
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for NS Tweet
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,888 ▲13114.00 ▼0.386.00 ▲3.8639.74 ▼10.11
Dashboard /wp-admin2,210 ▲224.87 ▼0.07100.52 ▼15.2139.80 ▼4.90
Posts /wp-admin/edit.php2,090 ▼22.01 ▼0.0235.30 ▼2.7335.21 ▼2.23
Add New Post /wp-admin/post-new.php1,536 ▲822.91 ▲4.33654.38 ▲32.4656.96 ▲0.93
Media Library /wp-admin/upload.php1,389 ▲14.18 ▼0.0299.31 ▼0.0942.20 ▼1.71
NetScripter Tweet Settings /wp-admin/plugins.php?page=netscripter-tweet-settings8222.0626.4025.40

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • Uninstall procedure had uncaught errors
    • > Deprecated in wp-content/plugins/ns-tweet/ns-tweet.php+385
    Function create_function() is deprecated
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_netscripter_tweet
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 50% 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
    • > GET request to /wp-admin/plugins.php?page=netscripter-tweet-settings
    • > Deprecated in wp-content/plugins/ns-tweet/ns-tweet.php+385
    Function create_function() is deprecated

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
The following issues need your attention
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/ns-tweet/ns-tweet.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
6 plugin tags: netscripter, tweet, twitter, tweets, slider...

ns-tweet/ns-tweet.php Passed 13 tests

The main PHP script in "NS Tweet" version 1.0 is automatically included on every request by WordPress
48 characters long description:
Twitter Widget for your Site with Slider option.

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
Good job! No executable or dangerous file extensions detected893 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP2125145497
CSS21621230
JavaScript15818166

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity25.00
▷ Minimum class complexity19.00
▷ Maximum class complexity31.00
Average method complexity3.82
▷ Minimum method complexity1.00
▷ Maximum method complexity23.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods17
▷ Static methods423.53%
▷ Public methods1270.59%
▷ Protected methods00.00%
▷ Private methods529.41%
Functions7
▷ Named functions685.71%
▷ Anonymous functions114.29%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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
2 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/trans-bg.png0.22KB0.14KB▼ 34.68%
assets/images/followme.png1.78KB1.56KB▼ 12.27%