10% adentify

Code Review | AdEntify

WordPress plugin AdEntify scored 10% from 54 tests.

About plugin

  • Plugin page: adentify
  • Plugin version: 1.0.10
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.2
  • WordPress version: 5.8.1
  • First release: Dec 22, 2014
  • Latest release: Jul 6, 2015
  • Number of updates: 36
  • Update frequency: every 5.6 days
  • Top authors: AdEntify (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 995 total downloads

Benchmarks

Plugin footprint 75% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The following installer errors require your attention
  • The plugin cannot be installed
    • > Compile error in wp-content/plugins/adentify/vendor/guzzlehttp/guzzle/src/Event/Emitter.php+49
    Cannot use lexical variable $eventName as a parameter name

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

A check of server-side resources used by AdEntify
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.83 ▲0.1237.87 ▲13.38
Dashboard /wp-admin3.06 ▲0.0038.06 ▼15.60
Posts /wp-admin/edit.php3.11 ▲0.0051.59 ▼2.87
Add New Post /wp-admin/post-new.php5.42 ▼0.0298.04 ▼568.87
Media Library /wp-admin/upload.php3.00 ▲0.0044.11 ▲5.81

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 895 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

AdEntify: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,679 ▲8316.20 ▲0.4513.55 ▲0.9048.76 ▼7.00
Dashboard /wp-admin2,970 ▲395.90 ▼0.32163.76 ▲6.58112.94 ▼5.90
Posts /wp-admin/edit.php2,739 ▼02.71 ▼0.0272.53 ▼5.2092.70 ▼1.75
Add New Post /wp-admin/post-new.php1,683 ▲6818.55 ▼2.84460.89 ▲132.13118.92 ▲6.83
Media Library /wp-admin/upload.php1,807 ▼05.05 ▼0.02188.69 ▲27.89168.82 ▲45.79

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The plugin uninstalled successfully, without leaving any zombie files or tables

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting 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 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/adentify/adentify.php
  • 309× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Twig_Tests_Profiler_Dumper_AbstractTest' not found in wp-content/plugins/adentify/vendor/twig/twig/test/Twig/Tests/Profiler/Dumper/TextTest.php:12
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\Post\\PostFileInterface' not found in wp-content/plugins/adentify/vendor/guzzlehttp/guzzle/src/Post/PostFile.php:13
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\Message\\MessageInterface' not found in wp-content/plugins/adentify/vendor/guzzlehttp/guzzle/src/Message/AbstractMessage.php:6
    • > PHP Fatal error
      Uncaught Error: Interface 'Twig_LoaderInterface' not found in wp-content/plugins/adentify/vendor/twig/twig/lib/Twig/Loader/String.php:24
    • > PHP Fatal error
      Uncaught Error: Class 'Twig_Profiler_Dumper_Text' not found in wp-content/plugins/adentify/vendor/twig/twig/lib/Twig/Profiler/Dumper/Html.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'Twig_Test_NodeTestCase' not found in wp-content/plugins/adentify/vendor/twig/twig/test/Twig/Tests/Node/Expression/ParentTest.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'Twig_Node_Expression_Test' not found in wp-content/plugins/adentify/vendor/twig/twig/lib/Twig/Node/Expression/Test/Odd.php:21
    • > PHP Fatal error
      Uncaught Error: Class 'Twig_Node_Expression' not found in wp-content/plugins/adentify/vendor/twig/twig/lib/Twig/Node/Expression/Array.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'Twig_TokenParser' not found in wp-content/plugins/adentify/vendor/twig/extensions/lib/Twig/Extensions/SimpleTokenParser.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/adentify/vendor/twig/twig/test/Twig/Tests/ErrorTest.php:12

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)
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that require attention:
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === adentify === )
You can take inspiration from this readme.txt

adentify/adentify.php Passed 13 tests

The primary PHP file in "AdEntify" version 1.0.10 is used by WordPress to initiate all plugin functionality
34 characters long description:
A brief description of the Plugin.

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
Good job! No executable or dangerous file extensions detected38,818 lines of code in 619 files:
LanguageFilesBlank linesComment linesLines of code
PHP3904,69810,32822,513
JavaScript548881,0715,990
reStructuredText1073,3233,3254,849
Markdown540301,837
CSS5155351,039
C1166150793
JSON1150549
Twig161015549
PO File2900196
make3435179
XML44077
YAML417073
Bourne Shell124055
HTML130055
Python1222348
C/C++ Header171311
m41215

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity6.26
▷ Minimum class complexity1.00
▷ Maximum class complexity117.00
Average method complexity2.18
▷ Minimum method complexity1.00
▷ Maximum method complexity44.00
Code structure
Namespaces12
Interfaces38
Traits4
Classes359
▷ Abstract classes195.29%
▷ Concrete classes34094.71%
▷ Final classes10.29%
Methods1,957
▷ Static methods552.81%
▷ Public methods1,72187.94%
▷ Protected methods1286.54%
▷ Private methods1085.52%
Functions119
▷ Named functions9882.35%
▷ Anonymous functions2117.65%
Constants81
▷ Global constants2125.93%
▷ Class constants6074.07%
▷ Public constants60100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
14 PNG files occupy 0.28MB with 0.16MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
js/vendor/select2/select2x2.png0.83KB0.77KB▼ 6.15%
images/tagShape6.png3.27KB0.39KB▼ 87.92%
images/tag-background.png1.34KB1.18KB▼ 11.66%
images/tagShape2.png3.27KB0.39KB▼ 87.94%
images/tagShape7.png3.11KB0.41KB▼ 86.73%