10% automatic-articles-importer

Code Review | Automatic Articles Importer

WordPress plugin Automatic Articles Importer scored10%from 54 tests.

About plugin

  • Plugin page: automatic-article...
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Jan 17, 2023
  • Latest release: Apr 27, 2023
  • Number of updates: 12
  • Update frequency: every 8.4 days
  • Top authors: zluck (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /460 total downloads

Benchmarks

Plugin footprint 58% 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
  • Install procedure had errors
    • > Parse error in wp-content/plugins/automatic-articles-importer/classes/class-article-import.php+135
    syntax error, unexpected '|', expecting ';' or '{'

Server metrics [RAM: ▲0.00MB] [CPU: ▼6.48ms] Passed 4 tests

An overview of server-side resources used by Automatic Articles Importer
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0035.68 ▼2.25
Dashboard /wp-admin3.31 ▲0.0051.72 ▲2.93
Posts /wp-admin/edit.php3.36 ▲0.0046.91 ▼0.95
Add New Post /wp-admin/post-new.php5.89 ▲0.0080.94 ▼18.34
Media Library /wp-admin/upload.php3.23 ▲0.0034.52 ▼4.38

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Automatic Articles Importer
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲4313.35 ▼1.454.27 ▲2.2440.07 ▲1.25
Dashboard /wp-admin2,209 ▲214.88 ▲0.01103.89 ▼0.2937.49 ▼4.93
Posts /wp-admin/edit.php2,092 ▼02.00 ▼0.0639.21 ▼2.6535.28 ▼2.40
Add New Post /wp-admin/post-new.php1,533 ▼023.37 ▲0.29627.45 ▼73.1451.22 ▼3.75
Media Library /wp-admin/upload.php1,388 ▼04.20 ▼0.0096.56 ▼6.2541.95 ▼0.18

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded

Smoke tests 50% 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 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
Please fix the following
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/automatic-articles-importer/automatic-articles-importer.php
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/automatic-articles-importer/includes/wp-ziai-article-form.php:2
    • > PHP Parse error
      syntax error, unexpected '|', expecting ';' or '{' in wp-content/plugins/automatic-articles-importer/classes/class-article-import.php on line 135

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
No plugin tags provided

automatic-articles-importer/automatic-articles-importer.php 85% from 13 tests

The main PHP script in "Automatic Articles Importer" version 1.1 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Domain Path: The domain path folder was not found ("/languages")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Everything looks great! No dangerous files found in this plugin2,007 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
CSS2821051,360
PHP55149551
JavaScript110196

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity11.67
▷ Minimum class complexity5.00
▷ Maximum class complexity18.00
Average method complexity2.29
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods25
▷ Static methods520.00%
▷ Public methods2392.00%
▷ Protected methods14.00%
▷ Private methods14.00%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.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.16MB with 0.07MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/icon-128x128.png17.48KB9.04KB▼ 48.24%
assets/icon-256x256.png57.90KB28.56KB▼ 50.67%
assets/screenshot-1.png90.92KB29.12KB▼ 67.98%
assets/css/images/ui-bg_highlight-soft_75_cccccc_1x100.png0.08KB0.17KB0.00%