64% nativery

Code Review | Nativery Plugin

WordPress plugin Nativery Plugin scored 64% from 54 tests.

About plugin

  • Plugin page: nativery
  • Plugin version: 0.1.6
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.7.2
  • WordPress version: 6.3.1
  • First release: Jan 14, 2019
  • Latest release: Jun 18, 2021
  • Number of updates: 15
  • Update frequency: every 59.2 days
  • Top authors: nativery (100%)

Code review

54 tests

User reviews

1 review

Install metrics

400+ active / 1,548 total downloads

Benchmarks

Plugin footprint 48% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▲0.09MB] [CPU: ▼2.46ms] Passed 4 tests

Server-side resources used by Nativery Plugin
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.1036.85 ▼7.15
Dashboard /wp-admin3.39 ▲0.0946.64 ▼2.58
Posts /wp-admin/edit.php3.50 ▲0.1546.44 ▲0.25
Add New Post /wp-admin/post-new.php5.97 ▲0.0995.53 ▲1.63
Media Library /wp-admin/upload.php3.31 ▲0.0937.98 ▼0.36

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 16 new files
Database: no new tables, 10 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
nativery_enabled
nativery_widgets
widget_recent-posts
widget_nativery_widget
nativery_css
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

Nativery Plugin: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,829 ▲9413.38 ▼0.996.03 ▲4.2641.15 ▲1.31
Dashboard /wp-admin2,223 ▲345.86 ▲0.86104.47 ▼18.2675.95 ▲36.21
Posts /wp-admin/edit.php2,107 ▲182.00 ▼0.0537.10 ▲0.7933.26 ▲0.91
Add New Post /wp-admin/post-new.php1,682 ▲14922.21 ▼0.94668.42 ▲19.5538.36 ▼13.59
Media Library /wp-admin/upload.php1,408 ▲204.21 ▼0.05101.35 ▼2.2170.33 ▲28.88

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • Uninstall procedure validation failed for this plugin
    • > Error in wp-content/plugins/nativery/Nativery.php+133
    Uncaught Error: Using $this when not in object context in wp-content/plugins/nativery/Nativery.php:133
    Stack trace:
    #0 wp-includes/class-wp-hook.php(310): Nativery::nativery_uninstall()
    #1 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
    #2 wp-includes/plugin.php(517): WP_Hook->do_action()
    #3 wp-admin/includes/plugin.php(1269): do_action()
    #4 wp-admin/includes/plugin.php(960): uninstall_plugin()
  • This plugin has failed uninstalling correctly, leaving 16 files (0.04MB) in the plugin directory
    • (new file) lang/en_US.po
    • (new file) Nativery.php
    • (new file) lang/es_ES.mo
    • (new file) js/editorShortcode.js
    • (new file) images/icon.png
    • (new file) images/icon32.png
    • (new file) lang/en_US.mo
    • (new file) css/natcustom.css
    • (new file) js/lwl.png
    • (new file) css/nativery.css
    • ...
  • This plugin did not uninstall successfully, leaving 9 options in the database
    • widget_nativery_widget
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • recovery_mode_email_last_sent
    • nativery_css
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, 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
  • 6× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_fields() in wp-content/plugins/nativery/nativery_settings.php:9
    • > PHP Warning
      Use of undefined constant NATIVERY_CURRENT_VERSION - assumed 'NATIVERY_CURRENT_VERSION' (this will throw an Error in a future version of PHP) in wp-content/plugins/nativery/nativery_settings.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/nativery/Nativery.php:59
    • > PHP Warning
      Use of undefined constant WP_PLUGIN_URL - assumed 'WP_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/nativery/Nativery.php on line 57
    • > PHP Warning
      Use of undefined constant NATIVERY_PUGIN_NAME - assumed 'NATIVERY_PUGIN_NAME' (this will throw an Error in a future version of PHP) in wp-content/plugins/nativery/nativery_settings.php on line 4
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/nativery/widget.class.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
9 plugin tags: advertising, content ads, native ad, nativery, widget...

nativery/Nativery.php 92% from 13 tests

The entry point to "Nativery Plugin" version 0.1.6 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("nativery.php" instead of "Nativery.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected799 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP314470464
PO File35656160
CSS150150
JavaScript11025

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.57
Average class complexity35.50
▷ Minimum class complexity14.00
▷ Maximum class complexity57.00
Average method complexity4.14
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods23
▷ Static methods939.13%
▷ Public methods23100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants7100.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
3 PNG files occupy 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/icon.png2.03KB0.74KB▼ 63.44%
js/lwl.png5.45KB0.71KB▼ 86.92%
images/icon32.png3.10KB0.74KB▼ 76.07%